mirror of
https://github.com/opdavies/gmail-filter-builder.git
synced 2025-11-13 21:48:45 +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.
(cherry picked from commit 330d6f9393)
This commit is contained in:
parent
7db076efdb
commit
8b38214205
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