Remove name and email

This commit is contained in:
Oliver Davies 2016-07-15 01:08:08 +01:00
parent b37eaa48c6
commit 48395c0ba7
2 changed files with 7 additions and 16 deletions

View file

@ -24,11 +24,8 @@ class GmailFilterBuilder
*/
private $filters = [];
public function __construct($name, $email, $filters)
public function __construct(array $filters)
{
$this->name = $name;
$this->email = $email;
$this->twig = new Twig_Environment(
new Twig_Loader_Filesystem(__DIR__ . '/../templates')
);
@ -46,18 +43,14 @@ class GmailFilterBuilder
/**
* Build Gmail filters.
*
* @param string $name
* The author name.
* @param string $email
* The author email address.
* @param GmailFilter[] $filters
* An array of filters to process.
*
* @return $this
*/
public static function build($name, $email, array $filters)
public static function build(array $filters)
{
return new static($name, $email, $filters);
return new static($filters);
}
/**

View file

@ -1,9 +1,7 @@
<?xml version='1.0' encoding='UTF-8'?>
<feed xmlns='http://www.w3.org/2005/Atom' xmlns:apps='http://schemas.google.com/apps/2006'>
<author>
<name>{{ name }}</name>
<email>{{ email }}</email>
</author>
<?xml version='1.0' encoding='UTF-8'?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:apps='http://schemas.google.com/apps/2006'>
<title>Mail Filters (Blackhole)</title>
<id>tag:mail.google.com,2008:filters:1297349082768</id>
<updated>2013-02-04T15:50:38Z</updated>
{% for filter in filters -%}
<entry>