mirror of
https://github.com/opdavies/gmail-filter-builder.git
synced 2025-11-25 18:51:58 +00:00
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.
This commit is contained in:
parent
31cfaf8f6f
commit
330d6f9393
3 changed files with 30 additions and 0 deletions
12
src/Helpers.php
Normal file
12
src/Helpers.php
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Opdavies\GmailFilterBuilder;
|
||||
|
||||
use Opdavies\GmailFilterBuilder\Model\Filter;
|
||||
|
||||
function filter(): Filter
|
||||
{
|
||||
return new Filter();
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue