@@ -8,7 +8,7 @@ |
||
8 | 8 | |
9 | 9 | class StringListener implements ListenerAggregateInterface |
10 | 10 | { |
11 | - protected $listeners = array(); |
|
11 | + protected $listeners = array(); |
|
12 | 12 | |
13 | 13 | /** |
14 | 14 | * Attach to an event manager |
@@ -51,7 +51,7 @@ |
||
51 | 51 | if (!empty($capture)) { |
52 | 52 | if ($viewModel->isAppend()) { |
53 | 53 | $oldResult = $viewModel->{$capture}; |
54 | - $viewModel->setVariable($capture, $oldResult . $result); |
|
54 | + $viewModel->setVariable($capture, $oldResult.$result); |
|
55 | 55 | } else { |
56 | 56 | $viewModel->setVariable($capture, $result); |
57 | 57 | } |
@@ -31,7 +31,7 @@ |
||
31 | 31 | * |
32 | 32 | * @param EventManagerInterface $events |
33 | 33 | * @param integer $priority |
34 | - */ |
|
34 | + */ |
|
35 | 35 | public function attach(EventManagerInterface $events, $priority = 1) |
36 | 36 | { |
37 | 37 | $this->listeners[] = $events->attach(MvcEvent::EVENT_DISPATCH_ERROR, array($this, 'handleError'), $priority); |
@@ -124,10 +124,10 @@ discard block |
||
124 | 124 | } |
125 | 125 | |
126 | 126 | $router = $e->getRouter(); |
127 | - $basePath=$router->getBaseUrl(); |
|
127 | + $basePath = $router->getBaseUrl(); |
|
128 | 128 | $match = []; |
129 | 129 | |
130 | - if (preg_match('~^' . $basePath . '/([a-z]{2})(?:/|$)~', $e->getRequest()->getRequestUri(), $match)) { |
|
130 | + if (preg_match('~^'.$basePath.'/([a-z]{2})(?:/|$)~', $e->getRequest()->getRequestUri(), $match)) { |
|
131 | 131 | /* It seems we have already a language in the URI |
132 | 132 | * Now there are two possibilities: |
133 | 133 | * |
@@ -161,7 +161,7 @@ discard block |
||
161 | 161 | |
162 | 162 | $options = $this->moduleOptions; |
163 | 163 | // using default language if detect language is disabled |
164 | - $lang = $options->isDetectLanguage() ? $this->detectLanguage($e):$options->getDefaultLanguage(); |
|
164 | + $lang = $options->isDetectLanguage() ? $this->detectLanguage($e) : $options->getDefaultLanguage(); |
|
165 | 165 | $langUri = rtrim("$basePath/$lang$origUri", '/'); |
166 | 166 | if ($router->match($request->setUri($langUri)) instanceof RouteMatch) { |
167 | 167 | $e->stopPropagation(true); |
@@ -212,8 +212,8 @@ discard block |
||
212 | 212 | setlocale( |
213 | 213 | LC_ALL, |
214 | 214 | array( |
215 | - $locale . ".utf8", |
|
216 | - $locale . ".iso88591", |
|
215 | + $locale.".utf8", |
|
216 | + $locale.".iso88591", |
|
217 | 217 | $locale, |
218 | 218 | substr($locale, 0, 2), |
219 | 219 | 'de_DE.utf8', |
@@ -41,7 +41,7 @@ |
||
41 | 41 | $notifications = $event->getTarget()->getNotifications(); |
42 | 42 | if (is_array($notifications) && !empty($notifications)) { |
43 | 43 | foreach ($notifications as $notification) { |
44 | - $headScript->appendScript('/* ' . $notification->getNotification() . ' */'); |
|
44 | + $headScript->appendScript('/* '.$notification->getNotification().' */'); |
|
45 | 45 | } |
46 | 46 | } |
47 | 47 | } |
@@ -101,8 +101,8 @@ |
||
101 | 101 | } |
102 | 102 | $resolver = $e->getApplication()->getServiceManager()->get('ViewResolver'); |
103 | 103 | |
104 | - $templateDefault = $viewModel->getTemplate() . '.xml.phtml'; |
|
105 | - $templateChannel = $viewModel->getTemplate() . '.' . $channel . '.xml.phtml'; |
|
104 | + $templateDefault = $viewModel->getTemplate().'.xml.phtml'; |
|
105 | + $templateChannel = $viewModel->getTemplate().'.'.$channel.'.xml.phtml'; |
|
106 | 106 | |
107 | 107 | |
108 | 108 | if ($channel != 'default' && $resolver->resolve($templateChannel)) { |
@@ -77,7 +77,7 @@ |
||
77 | 77 | } |
78 | 78 | $resolver = $e->getApplication()->getServiceManager()->get('ViewResolver'); |
79 | 79 | |
80 | - $template = $viewModel->getTemplate() . '.ajax'; |
|
80 | + $template = $viewModel->getTemplate().'.ajax'; |
|
81 | 81 | if ($resolver->resolve($template)) { |
82 | 82 | $viewModel->setTemplate($template); |
83 | 83 | } else { |
@@ -32,7 +32,7 @@ |
||
32 | 32 | $this->serviceLocator = $serviceLocator; |
33 | 33 | } |
34 | 34 | |
35 | - public function attach(EventManagerInterface $events, $priority=1000) |
|
35 | + public function attach(EventManagerInterface $events, $priority = 1000) |
|
36 | 36 | { |
37 | 37 | $eventsApplication = $this->serviceLocator->get("Application")->getEventManager(); |
38 | 38 |
@@ -47,7 +47,7 @@ |
||
47 | 47 | */ |
48 | 48 | protected $paginator; |
49 | 49 | |
50 | - /** |
|
50 | + /** |
|
51 | 51 | * @return string |
52 | 52 | */ |
53 | 53 | public function getPaginatorName() |
@@ -125,16 +125,16 @@ |
||
125 | 125 | |
126 | 126 | public function setParams($params) |
127 | 127 | { |
128 | - if(is_array($params)){ |
|
129 | - if(isset($params['paginatorParams'])){ |
|
128 | + if (is_array($params)) { |
|
129 | + if (isset($params['paginatorParams'])) { |
|
130 | 130 | $this->setPaginatorParams($params['paginatorParams']); |
131 | 131 | unset($params['paginatorParams']); |
132 | 132 | } |
133 | - if(isset($params['paginators'])){ |
|
133 | + if (isset($params['paginators'])) { |
|
134 | 134 | $this->setPaginators($params['paginators']); |
135 | 135 | unset($params['paginators']); |
136 | 136 | } |
137 | - if(isset($params['paginatorName'])){ |
|
137 | + if (isset($params['paginatorName'])) { |
|
138 | 138 | $this->setPaginatorName($params['paginatorName']); |
139 | 139 | unset($params['paginatorName']); |
140 | 140 | } |
@@ -116,7 +116,7 @@ discard block |
||
116 | 116 | */ |
117 | 117 | public function getKeys() |
118 | 118 | { |
119 | - return $this->collection->map(function ($element) { |
|
119 | + return $this->collection->map(function($element) { |
|
120 | 120 | return $this->getKey($element); |
121 | 121 | })->toArray(); |
122 | 122 | } |
@@ -302,7 +302,7 @@ discard block |
||
302 | 302 | */ |
303 | 303 | public function offsetExists($offset) |
304 | 304 | { |
305 | - return (bool)$this->getElement($offset); |
|
305 | + return (bool) $this->getElement($offset); |
|
306 | 306 | } |
307 | 307 | |
308 | 308 | /** |
@@ -352,7 +352,7 @@ discard block |
||
352 | 352 | { |
353 | 353 | if (!isset($this->identityExtractor)) { |
354 | 354 | // default identity extractor |
355 | - $this->identityExtractor = function ($element) { |
|
355 | + $this->identityExtractor = function($element) { |
|
356 | 356 | if (!is_callable([$element, 'getId'])) { |
357 | 357 | throw new \LogicException('$element must have getId() method'); |
358 | 358 | } |
@@ -379,7 +379,7 @@ discard block |
||
379 | 379 | */ |
380 | 380 | protected function getElement($key) |
381 | 381 | { |
382 | - return $this->collection->filter(function ($element) use ($key) { |
|
382 | + return $this->collection->filter(function($element) use ($key) { |
|
383 | 383 | return $this->getKey($element) == $key; |
384 | 384 | })->first(); |
385 | 385 | } |