gmail-filter-builder/src/Helpers.php
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

13 lines
175 B
PHP

<?php
declare(strict_types=1);
namespace Opdavies\GmailFilterBuilder;
use Opdavies\GmailFilterBuilder\Model\Filter;
function filter(): Filter
{
return new Filter();
}