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