|
@@ -18,13 +18,13 @@ discard block |
|
|
block discarded – undo |
|
18
|
18
|
/** |
|
19
|
19
|
* {@inheritdoc} |
|
20
|
20
|
*/ |
|
21
|
|
- public function getFilters(){ |
|
|
21
|
+ public function getFilters() { |
|
22
|
22
|
return array( |
|
23
|
|
- new \Twig_SimpleFilter($this->filterPrefix . 'Avatar', array($this, 'avatar'), $this->filterOptions), |
|
24
|
|
- new \Twig_SimpleFilter($this->filterPrefix . 'Https', array($this, 'https'), $this->filterOptions), |
|
25
|
|
- new \Twig_SimpleFilter($this->filterPrefix . 'Size', array($this, 'size'), $this->filterOptions), |
|
26
|
|
- new \Twig_SimpleFilter($this->filterPrefix . 'Default', array($this, 'def'), $this->filterOptions), |
|
27
|
|
- new \Twig_SimpleFilter($this->filterPrefix . 'Rating', array($this, 'rating'), $this->filterOptions) |
|
|
23
|
+ new \Twig_SimpleFilter($this->filterPrefix.'Avatar', array($this, 'avatar'), $this->filterOptions), |
|
|
24
|
+ new \Twig_SimpleFilter($this->filterPrefix.'Https', array($this, 'https'), $this->filterOptions), |
|
|
25
|
+ new \Twig_SimpleFilter($this->filterPrefix.'Size', array($this, 'size'), $this->filterOptions), |
|
|
26
|
+ new \Twig_SimpleFilter($this->filterPrefix.'Default', array($this, 'def'), $this->filterOptions), |
|
|
27
|
+ new \Twig_SimpleFilter($this->filterPrefix.'Rating', array($this, 'rating'), $this->filterOptions) |
|
28
|
28
|
); |
|
29
|
29
|
} |
|
30
|
30
|
|
|
@@ -36,7 +36,7 @@ discard block |
|
|
block discarded – undo |
|
36
|
36
|
*/ |
|
37
|
37
|
public function avatar($email) { |
|
38
|
38
|
if (filter_var($email, FILTER_VALIDATE_EMAIL)) { |
|
39
|
|
- return $this->baseUrl . "avatar/" . $this->generateHash($email); |
|
|
39
|
+ return $this->baseUrl."avatar/".$this->generateHash($email); |
|
40
|
40
|
} else { |
|
41
|
41
|
throw new InvalidArgumentException("The avatar filter must be passed a valid Email address"); |
|
42
|
42
|
} |
|
@@ -136,7 +136,7 @@ discard block |
|
|
block discarded – undo |
|
136
|
136
|
*/ |
|
137
|
137
|
private function query($string, array $addition) { |
|
138
|
138
|
foreach ($addition as $name => $value) { |
|
139
|
|
- $string .= (strpos($string, "?") === FALSE ? "?" : "&") . $name . "=" . $value; |
|
|
139
|
+ $string .= (strpos($string, "?") === FALSE ? "?" : "&").$name."=".$value; |
|
140
|
140
|
} |
|
141
|
141
|
return $string; |
|
142
|
142
|
} |