Commit graph

53 commits

Author SHA1 Message Date
Oliver Davies 8b38214205 Add a filter() helper method
Add a namespaced `filter()` method that can be imported via `use
function` and use it as an alternative for `new Filter` or
`Filter::create()`.

This provides a cleaner, easier to read syntax - particularly if you
have a lot of filters in the same file.

(cherry picked from commit 330d6f9393)
2020-07-11 01:26:38 +01:00
Oliver Davies 7db076efdb Add run-tests workflow 2020-03-03 09:44:50 +00:00
Oliver Davies 778374b2c9 Split properties into conditions and actions 2019-12-29 00:20:06 +00:00
Oliver Davies 22b696d47c Remove blank lines 2019-05-03 23:47:57 +01:00
Oliver Davies 6815cd4f26 Put all generated files in one directory
This means that there's no need to delete generated files per test
2019-05-03 20:46:25 +01:00
Oliver Davies 052629ff7d Generated output filenames should match the input filename 2019-05-01 19:02:49 +01:00
Oliver Davies de9db84d6d Update test names
Fixes #19
2019-04-19 07:32:09 +01:00
Oliver Davies 4c00155956 Generated filters can be expanded 2019-04-18 23:48:04 +01:00
Oliver Davies b123dcf079 Update test, add expanded option 2019-04-18 21:32:48 +01:00
Oliver Davies 0346f25f96 Add GenerateFiltersTest 2019-04-18 21:08:19 +01:00
Oliver Davies a4c913ab38 Add more type hints and return types
Fixes #20
2019-04-11 01:01:19 +01:00
Oliver Davies 0b225663e0 Allow for passing multiple lists 2019-04-10 23:34:16 +01:00
Oliver Davies 035f4fb6c7 Fix spaces 2019-04-01 13:22:36 +01:00
Oliver Davies 95924a3ccd Update expected Exception 2019-04-01 13:21:04 +01:00
Oliver Davies 3995d4ffd6 Update test method name 2019-04-01 13:20:09 +01:00
Oliver Davies fbe1edf8f0 Throw Exception if there is no addresses file
Fixes #14
2019-04-01 13:19:39 +01:00
Oliver Davies 20aad9349b Fix spaces 2019-04-01 12:55:13 +01:00
Oliver Davies 58317fb17b Start adding return types 2018-12-27 22:13:07 +00:00
Oliver Davies 6aeeb5b2c4 Add support for multiple address file directories
Fixes #13
2018-12-27 22:00:52 +00:00
Oliver Davies cdefa25638 Make methods static 2018-08-26 20:48:33 +01:00
Oliver Davies c10906e56e Remove string typehint 2018-08-21 10:25:32 +01:00
Oliver Davies d8b10d8f49 Add ability to load filters from partials
Issue #12
2018-08-21 09:14:22 +01:00
Oliver Davies bac720c679 Update namespace 2018-08-21 09:10:53 +01:00
Oliver Davies a5c327eaed Add addresses directory within stubs 2018-08-21 08:45:50 +01:00
Oliver Davies 7b2ffc5b55 Move Addresses into Service 2018-08-21 08:42:35 +01:00
Oliver Davies 1ce1139008 Inline expected addresses
Issue #11
2018-08-20 14:12:35 +01:00
Oliver Davies 3f9d4d081b Add tests 2018-08-20 14:04:59 +01:00
Oliver Davies 1b8c79f33b Organise tests 2018-08-20 13:35:01 +01:00
Oliver Davies d112fce009 Rename method. Fix PHP 5.6 error 2018-08-15 21:48:19 +01:00
Oliver Davies 5a0489c61e Add ability to filter by mailing list 2018-08-15 21:36:37 +01:00
Oliver Davies cac162c264 Spaces 2018-08-15 21:23:10 +01:00
Oliver Davies 86a3964dd0 Update docblocks 2018-08-15 21:19:47 +01:00
Oliver Davies d916b8e165 Allow for setting multiple subject conditions 2018-06-01 20:26:06 +01:00
Oliver Davies 5dd94e2852 Remove blank line 2018-06-01 19:44:58 +01:00
Oliver Davies 0ca7436297 Add the toArray method on Filter 2018-06-01 19:33:57 +01:00
Oliver Davies 9f1d80f968 Ensure that empty values do not add to or from conditions 2018-06-01 19:31:24 +01:00
Oliver Davies 634fc87897 Update imports 2018-06-01 19:15:21 +01:00
Oliver Davies 2f71ff8bda Fix CS issues 2018-03-20 20:34:32 +00:00
Oliver Davies b9b41aa437 Fix output for tests to pass again 2018-01-15 09:24:42 +00:00
Oliver Davies b61178b9b0 More new lines 2018-01-05 00:55:22 +00:00
Oliver Davies f32d4a5139 Add implode method
Ensure that imploded values are wrapped with the correct prefix
and suffix, and have the correct separators.
2018-01-05 00:02:14 +00:00
Oliver Davies 6ccf830d23 Add line breaks for better readability 2018-01-04 23:22:23 +00:00
Oliver Davies 761eba6203 Hide filters 2017-12-30 13:42:56 +00:00
Oliver Davies 728d284f09 Add docblocks, small fixes 2017-12-30 10:56:07 +00:00
Oliver Davies 9097da2972 Change to and from to use strings or arrays 2017-12-30 10:49:31 +00:00
Oliver Davies 02dddbdaf6 Finish Builder 2017-12-30 10:40:01 +00:00
Oliver Davies 922d4af8c0 Remove extra setUp 2017-11-28 07:35:01 +00:00
Oliver Davies 907ff6f1bd Extend TestCase 2017-11-28 07:10:39 +00:00
Oliver Davies 77ab5d9f9b wip 2017-11-04 09:38:14 +00:00
Oliver Davies 654457beee Add more conditions 2017-11-04 09:37:25 +00:00