mirror of
https://github.com/opdavies/gmail-filter-builder.git
synced 2025-03-20 04:00:55 +00:00
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
)
13 lines
175 B
PHP
13 lines
175 B
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace Opdavies\GmailFilterBuilder;
|
|
|
|
use Opdavies\GmailFilterBuilder\Model\Filter;
|
|
|
|
function filter(): Filter
|
|
{
|
|
return new Filter();
|
|
}
|