@@ -42,12 +42,12 @@ discard block |
||
| 42 | 42 | public function init($filters = array(), $filterFile = '', $exclusive = array()) |
| 43 | 43 | { |
| 44 | 44 | if (count($exclusive) > 0 && (count($filters) > 0 || $filterFile !== '')) { |
| 45 | - throw new \RuntimeException("It's not possible to define filter lists and an exclusive list at the same time [Extension: " . get_class($this) . '].'); |
|
| 45 | + throw new \RuntimeException("It's not possible to define filter lists and an exclusive list at the same time [Extension: ".get_class($this).'].'); |
|
| 46 | 46 | } |
| 47 | 47 | |
| 48 | 48 | if ($filterFile !== '') { |
| 49 | 49 | if (!file_exists($filterFile)) { |
| 50 | - throw new \RuntimeException('Filter file not found: ' . $filterFile); |
|
| 50 | + throw new \RuntimeException('Filter file not found: '.$filterFile); |
|
| 51 | 51 | } |
| 52 | 52 | |
| 53 | 53 | $filterElements = EnvAwareYaml::parse(file_get_contents($filterFile)); |
@@ -72,7 +72,7 @@ discard block |
||
| 72 | 72 | if (is_array($urls)) { |
| 73 | 73 | foreach ($urls as $url) { |
| 74 | 74 | $uri = new Uri($url); |
| 75 | - $this->exclusives[$rule][] = (string)$uri; |
|
| 75 | + $this->exclusives[$rule][] = (string) $uri; |
|
| 76 | 76 | } |
| 77 | 77 | } |
| 78 | 78 | } |
@@ -93,7 +93,7 @@ discard block |
||
| 93 | 93 | */ |
| 94 | 94 | public function isFiltered(Event $event, $ruleName, UriAwareResponse $response) |
| 95 | 95 | { |
| 96 | - $uri = (string)$this->retriever->getOriginUri($response->getUri()); |
|
| 96 | + $uri = (string) $this->retriever->getOriginUri($response->getUri()); |
|
| 97 | 97 | |
| 98 | 98 | if ($this->currentModus === self::MODUS_FILTER) { |
| 99 | 99 | $isFiltered = $this->isFilteredByFilter($ruleName, $uri); |
@@ -112,7 +112,7 @@ discard block |
||
| 112 | 112 | private function isFilteredByFilter($ruleName, $uri) |
| 113 | 113 | { |
| 114 | 114 | foreach ($this->filters as $filter) { |
| 115 | - if ($ruleName === $filter['rule'] && 0 < preg_match('$' . $filter['uri'] . '$', $uri)) { |
|
| 115 | + if ($ruleName === $filter['rule'] && 0 < preg_match('$'.$filter['uri'].'$', $uri)) { |
|
| 116 | 116 | return true; |
| 117 | 117 | } |
| 118 | 118 | } |