@@ -60,7 +60,7 @@ discard block |
||
60 | 60 | { |
61 | 61 | $snippets = ArrayUtils::merge($this->fromConfig($name), $this->fromEvent($name, $values)); |
62 | 62 | |
63 | - uasort($snippets, function ($a, $b) { |
|
63 | + uasort($snippets, function($a, $b) { |
|
64 | 64 | $prioA = is_array($a) && isset($a['priority']) ? $a['priority'] : 0; |
65 | 65 | $prioB = is_array($b) && isset($b['priority']) ? $b['priority'] : 0; |
66 | 66 | |
@@ -88,7 +88,7 @@ discard block |
||
88 | 88 | |
89 | 89 | private function fromEvent($name, $values) |
90 | 90 | { |
91 | - $event = $this->events->getEvent($name, $this, $values); |
|
91 | + $event = $this->events->getEvent($name, $this, $values); |
|
92 | 92 | $results = $this->events->triggerEvent($event); |
93 | 93 | |
94 | 94 | $snippets = []; |
@@ -137,7 +137,7 @@ discard block |
||
137 | 137 | $content = $item['content']; |
138 | 138 | |
139 | 139 | foreach ($values as $key => $val) { |
140 | - $content = str_replace('%' . $key . '%', $val, $content); |
|
140 | + $content = str_replace('%'.$key.'%', $val, $content); |
|
141 | 141 | } |
142 | 142 | |
143 | 143 | return $content; |
@@ -142,18 +142,18 @@ discard block |
||
142 | 142 | return $this->start($type, $options); |
143 | 143 | } |
144 | 144 | |
145 | - $id = isset($options['id']) ? ' id="' . $options['id'] . '"' : ''; |
|
146 | - $class = isset($options['class']) ? ' ' . $options['class'] : ''; |
|
145 | + $id = isset($options['id']) ? ' id="'.$options['id'].'"' : ''; |
|
146 | + $class = isset($options['class']) ? ' '.$options['class'] : ''; |
|
147 | 147 | if ((isset($options['dismissable']) && $options['dismissable']) |
148 | 148 | || !isset($options['dismissable']) |
149 | 149 | ) { |
150 | 150 | $class .= ' alert-dismissable'; |
151 | 151 | $content = '<button type="button" class="close" data-dismiss="alert">×</button>' |
152 | - . '<span class="notification-content">' . $content . '</span>'; |
|
152 | + . '<span class="notification-content">'.$content.'</span>'; |
|
153 | 153 | } |
154 | 154 | |
155 | - $target = array_key_exists('target', $options)?' target="' . $options['target'] . '"':''; |
|
156 | - $markup = '<div ' . $id . ' class="alert alert-' . $type . $class . '" ' . $target . '>' . $content . '</div>' . PHP_EOL; |
|
155 | + $target = array_key_exists('target', $options) ? ' target="'.$options['target'].'"' : ''; |
|
156 | + $markup = '<div '.$id.' class="alert alert-'.$type.$class.'" '.$target.'>'.$content.'</div>'.PHP_EOL; |
|
157 | 157 | return $markup; |
158 | 158 | } |
159 | 159 | |
@@ -191,7 +191,7 @@ discard block |
||
191 | 191 | public function __call($method, $args) |
192 | 192 | { |
193 | 193 | if (!in_array($method, array(self::TYPE_INFO, self::TYPE_DANGER, self::TYPE_SUCCESS, self::TYPE_WARNING))) { |
194 | - throw new \BadMethodCallException('Unknown method: ' . $method); |
|
194 | + throw new \BadMethodCallException('Unknown method: '.$method); |
|
195 | 195 | } |
196 | 196 | |
197 | 197 | // We know that $method is one of the valid types, so we can safely use it as "type"-parameter for the |
@@ -53,7 +53,7 @@ |
||
53 | 53 | } |
54 | 54 | |
55 | 55 | if (is_string($specs)) { |
56 | - $helper->appendScript('// if you are missing the script ' . $specs . ' look up your config and enclose it in an array'); |
|
56 | + $helper->appendScript('// if you are missing the script '.$specs.' look up your config and enclose it in an array'); |
|
57 | 57 | continue; |
58 | 58 | } |
59 | 59 |
@@ -40,7 +40,7 @@ |
||
40 | 40 | { |
41 | 41 | const FULL = 'full'; |
42 | 42 | const LONG = 'long'; |
43 | - const MEDIUM= 'medium'; |
|
43 | + const MEDIUM = 'medium'; |
|
44 | 44 | const SHORT = 'short'; |
45 | 45 | const NONE = 'none'; |
46 | 46 |
@@ -48,7 +48,7 @@ discard block |
||
48 | 48 | * @var array |
49 | 49 | */ |
50 | 50 | private $events = [ |
51 | - [ MvcEvent::EVENT_ROUTE, 'onRoute', 100 ], |
|
51 | + [MvcEvent::EVENT_ROUTE, 'onRoute', 100], |
|
52 | 52 | ]; |
53 | 53 | |
54 | 54 | /** |
@@ -88,7 +88,7 @@ discard block |
||
88 | 88 | $ajaxEvent->setRequest($request); |
89 | 89 | $ajaxEvent->setResponse($response); |
90 | 90 | |
91 | - $results = $this->ajaxEventManager->triggerEventUntil(function ($r) { |
|
91 | + $results = $this->ajaxEventManager->triggerEventUntil(function($r) { |
|
92 | 92 | return null !== $r; |
93 | 93 | }, $ajaxEvent); |
94 | 94 | $result = $results->last() ?: $ajaxEvent->getResult(); |
@@ -214,7 +214,7 @@ discard block |
||
214 | 214 | public function __call($method, $args) |
215 | 215 | { |
216 | 216 | if (0 !== strpos($method, 'do')) { |
217 | - throw new \BadMethodCallException('Unknown method "' . $method . '"'); |
|
217 | + throw new \BadMethodCallException('Unknown method "'.$method.'"'); |
|
218 | 218 | } |
219 | 219 | |
220 | 220 | $name = substr($method, 2); |
@@ -246,7 +246,7 @@ discard block |
||
246 | 246 | } |
247 | 247 | |
248 | 248 | if ($method && method_exists($listener, $method)) { |
249 | - return call_user_func_array([ $listener, $method ], $args); |
|
249 | + return call_user_func_array([$listener, $method], $args); |
|
250 | 250 | } |
251 | 251 | |
252 | 252 | if (is_callable($listener)) { |
@@ -256,7 +256,7 @@ discard block |
||
256 | 256 | throw new \UnexpectedValueException(sprintf( |
257 | 257 | 'Deferred listener %s%s is not callable.', |
258 | 258 | get_class($listener), |
259 | - $method ? ' has no method "' . $method . '" and ' : '' |
|
259 | + $method ? ' has no method "'.$method.'" and ' : '' |
|
260 | 260 | )); |
261 | 261 | } |
262 | 262 |
@@ -92,7 +92,7 @@ |
||
92 | 92 | |
93 | 93 | $view = $e->getApplication()->getServiceManager()->get('ViewManager')->getView(); |
94 | 94 | $view->addRenderingStrategy(array($strategy, 'selectRenderer'), 10); |
95 | - $view->addResponseStrategy(array($strategy, 'injectResponse'), 10); |
|
95 | + $view->addResponseStrategy(array($strategy, 'injectResponse'), 10); |
|
96 | 96 | } |
97 | 97 | } |
98 | 98 | } |
@@ -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 | } |
@@ -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', |