Completed
Push — develop ( f508dd...35e5c6 )
by Mathias
20:45 queued 12:46
created
module/Core/src/Core/Listener/LanguageRouteListener.php 2 patches
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -215,8 +215,8 @@
 block discarded – undo
215 215
     }
216 216
 
217 217
     /**
218
-     * @param $response
219
-     * @param $uri
218
+     * @param \Zend\Stdlib\ResponseInterface $response
219
+     * @param string $uri
220 220
      *
221 221
      * @return mixed
222 222
      */
Please login to merge, or discard this patch.
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -124,10 +124,10 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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',
Please login to merge, or discard this patch.
module/Core/src/Core/Controller/Plugin/CreatePaginatorService.php 3 patches
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -61,11 +61,11 @@
 block discarded – undo
61 61
         $paginatorManager = $this->serviceManager->get('Core/PaginatorService');
62 62
         $paginator = $paginatorManager->get($paginatorName);
63 63
         if (!isset($paginator) || !$paginator instanceof ZendPaginator) {
64
-            throw new \RuntimeException('Could not create paginator ' . $paginatorName);
64
+            throw new \RuntimeException('Could not create paginator '.$paginatorName);
65 65
         }
66 66
         $adapter = $paginator->getAdapter();
67 67
         if (!isset($adapter) || !$adapter instanceof AdapterInterface) {
68
-            throw new \RuntimeException('Paginator ' . $paginatorName . ' has no Adapter');
68
+            throw new \RuntimeException('Paginator '.$paginatorName.' has no Adapter');
69 69
         }
70 70
 
71 71
         $params     = $usePostParams
Please login to merge, or discard this patch.
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -81,7 +81,7 @@
 block discarded – undo
81 81
 
82 82
         $adapter->setParams($params);
83 83
         $paginator->setCurrentPageNumber($params->get('page', 1))
84
-                  ->setItemCountPerPage($params->get('count', 10));
84
+                    ->setItemCountPerPage($params->get('count', 10));
85 85
 
86 86
         return $paginator;
87 87
     }
Please login to merge, or discard this patch.
Doc Comments   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -46,7 +46,7 @@  discard block
 block discarded – undo
46 46
      * @param array $defaultParams
47 47
      * @param bool  $usePostParams
48 48
      *
49
-     * @return mixed
49
+     * @return ZendPaginator
50 50
      */
51 51
     public function __invoke($paginatorName, $defaultParams = array(), $usePostParams = false)
52 52
     {
@@ -106,7 +106,6 @@  discard block
 block discarded – undo
106 106
     }
107 107
     
108 108
     /**
109
-     * @param ControllerManager $controllerManager
110 109
      * @return CreatePaginatorService
111 110
      */
112 111
     public static function factory(ContainerInterface $container)
Please login to merge, or discard this patch.
module/Core/src/Core/Listener/DefaultListener.php 2 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -56,7 +56,7 @@
 block discarded – undo
56 56
      */
57 57
     public function postDispatch(MvcEvent $e)
58 58
     {
59
-       // $view = $this->serviceLocator->get('view');
59
+        // $view = $this->serviceLocator->get('view');
60 60
 
61 61
     }
62 62
     
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -32,11 +32,11 @@
 block discarded – undo
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
 
39
-        $postDispatch = $events->attach(MvcEvent::EVENT_DISPATCH, array($this, 'postDispatch'),$priority);
39
+        $postDispatch = $events->attach(MvcEvent::EVENT_DISPATCH, array($this, 'postDispatch'), $priority);
40 40
         //$events->detach($postDispatch);
41 41
 
42 42
         return $this;
Please login to merge, or discard this patch.
module/Core/src/Core/Listener/DeferredListenerAggregate.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -214,7 +214,7 @@  discard block
 block discarded – undo
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);
@@ -248,7 +248,7 @@  discard block
 block discarded – undo
248 248
         }
249 249
 
250 250
         if ($method && method_exists($listener, $method)) {
251
-            return call_user_func_array([ $listener, $method ], $args);
251
+            return call_user_func_array([$listener, $method], $args);
252 252
         }
253 253
 
254 254
         if (is_callable($listener)) {
@@ -257,7 +257,7 @@  discard block
 block discarded – undo
257 257
 
258 258
         throw new \UnexpectedValueException(sprintf(
259 259
             'Deferred listener %s%s is not callable.',
260
-            get_class($listener), $method ? ' has no method "' . $method . '" and ' : ''
260
+            get_class($listener), $method ? ' has no method "'.$method.'" and ' : ''
261 261
         ));
262 262
     }
263 263
     
Please login to merge, or discard this patch.
module/Auth/src/Auth/Controller/Plugin/LoginFilter.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -31,7 +31,7 @@
 block discarded – undo
31 31
      */
32 32
     public function __construct(LoginFilterService $loginFilter)
33 33
     {
34
-        $this->loginFilter = $loginFilter;;
34
+        $this->loginFilter = $loginFilter; ;
35 35
     }
36 36
 
37 37
     /**
Please login to merge, or discard this patch.
Indentation   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -44,11 +44,11 @@
 block discarded – undo
44 44
     }
45 45
 	
46 46
 	
47
-	/**
48
-	 * @param ContainerInterface $container
49
-	 *
50
-	 * @return static
51
-	 */
47
+    /**
48
+     * @param ContainerInterface $container
49
+     *
50
+     * @return static
51
+     */
52 52
     public static function factory(ContainerInterface $container)
53 53
     {
54 54
         return new static($container->get('Auth/LoginFilter'));
Please login to merge, or discard this patch.
Settings/Entity/Hydrator/Strategy/DisableElementsCapableFormSettings.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -57,7 +57,7 @@
 block discarded – undo
57 57
     protected function filterArrayStrings($array, $search, $replace)
58 58
     {
59 59
         $return = array();
60
-        foreach ((array)$array as $key => $value) {
60
+        foreach ((array) $array as $key => $value) {
61 61
             $key = str_replace($search, $replace, $key);
62 62
             $value = is_array($value)
63 63
                 ? $this->filterArrayStrings($value, $search, $replace)
Please login to merge, or discard this patch.
module/Applications/src/Applications/Repository/PaginationList.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -128,6 +128,6 @@
 block discarded – undo
128 128
         
129 129
         $pointer = $this->pointer + 1;
130 130
         
131
-		return isset($this->ids[$pointer]) ? $this->ids[$pointer] : null;
131
+        return isset($this->ids[$pointer]) ? $this->ids[$pointer] : null;
132 132
     }
133 133
 }
Please login to merge, or discard this patch.
module/Core/src/Core/Collection/IdentityWrapper.php 4 patches
Doc Comments   -1 removed lines patch added patch discarded remove patch
@@ -381,7 +381,6 @@
 block discarded – undo
381 381
 	}
382 382
 
383 383
 	/**
384
-	 * @param mixed $element
385 384
 	 * @return mixed
386 385
 	 */
387 386
 	protected function getElement($key)
Please login to merge, or discard this patch.
Indentation   +31 added lines, -31 removed lines patch added patch discarded remove patch
@@ -25,7 +25,7 @@  discard block
 block discarded – undo
25 25
      */
26 26
     protected $identityExtractor;
27 27
     
28
-	/**
28
+    /**
29 29
      * @param Collection $collection
30 30
      */
31 31
     public function __construct(Collection $collection)
@@ -81,7 +81,7 @@  discard block
 block discarded – undo
81 81
         $element = $this->getElement($key);
82 82
         
83 83
         if ($element !== false && $this->collection->removeElement($element)) {
84
-    		return $element;
84
+            return $element;
85 85
         }
86 86
     }
87 87
     
@@ -108,7 +108,7 @@  discard block
 block discarded – undo
108 108
     {
109 109
         $element = $this->getElement($key);
110 110
         
111
-		return $element !== false ? $element : null;
111
+        return $element !== false ? $element : null;
112 112
     }
113 113
     
114 114
     /**
@@ -184,7 +184,7 @@  discard block
 block discarded – undo
184 184
         
185 185
         if ($element !== false)
186 186
         {
187
-    		return $this->getKey($element);
187
+            return $this->getKey($element);
188 188
         }
189 189
     }
190 190
     
@@ -252,7 +252,7 @@  discard block
 block discarded – undo
252 252
         // validate mapped elements
253 253
         array_map($this->getIdentityExtractor(), $mapped->toArray());
254 254
         
255
-		return new static($mapped);
255
+        return new static($mapped);
256 256
     }
257 257
     
258 258
     /**
@@ -341,15 +341,15 @@  discard block
 block discarded – undo
341 341
     }
342 342
     
343 343
     /**
344
-	 * @param callable $identityExtractor
345
-	 * @return IdentityWrapper
346
-	 */
347
-	public function setIdentityExtractor(callable $identityExtractor)
348
-	{
349
-		$this->identityExtractor = $identityExtractor;
344
+     * @param callable $identityExtractor
345
+     * @return IdentityWrapper
346
+     */
347
+    public function setIdentityExtractor(callable $identityExtractor)
348
+    {
349
+        $this->identityExtractor = $identityExtractor;
350 350
 		
351
-		return $this;
352
-	}
351
+        return $this;
352
+    }
353 353
 
354 354
     /**
355 355
      *
@@ -371,23 +371,23 @@  discard block
 block discarded – undo
371 371
         return $this->identityExtractor;
372 372
     }
373 373
 
374
-	/**
375
-	 * @param mixed $element
376
-	 * @return mixed
377
-	 */
378
-	protected function getKey($element)
379
-	{
380
-	    return call_user_func($this->getIdentityExtractor(), $element);
381
-	}
374
+    /**
375
+     * @param mixed $element
376
+     * @return mixed
377
+     */
378
+    protected function getKey($element)
379
+    {
380
+        return call_user_func($this->getIdentityExtractor(), $element);
381
+    }
382 382
 
383
-	/**
384
-	 * @param mixed $element
385
-	 * @return mixed
386
-	 */
387
-	protected function getElement($key)
388
-	{
389
-	    return $this->collection->filter(function ($element) use ($key) {
390
-	        return $this->getKey($element) == $key;
391
-	    })->first();
392
-	}
383
+    /**
384
+     * @param mixed $element
385
+     * @return mixed
386
+     */
387
+    protected function getElement($key)
388
+    {
389
+        return $this->collection->filter(function ($element) use ($key) {
390
+            return $this->getKey($element) == $key;
391
+        })->first();
392
+    }
393 393
 }
Please login to merge, or discard this patch.
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -116,7 +116,7 @@  discard block
 block discarded – undo
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
     }
@@ -309,7 +309,7 @@  discard block
 block discarded – undo
309 309
      */
310 310
     public function offsetExists($offset)
311 311
     {
312
-        return (bool)$this->getElement($offset);
312
+        return (bool) $this->getElement($offset);
313 313
     }
314 314
     
315 315
     /**
@@ -359,7 +359,7 @@  discard block
 block discarded – undo
359 359
     {
360 360
         if (!isset($this->identityExtractor)) {
361 361
             // default identity extractor
362
-            $this->identityExtractor = function ($element) {
362
+            $this->identityExtractor = function($element) {
363 363
                 if (!is_callable([$element, 'getId'])) {
364 364
                     throw new \LogicException('$element must have getId() method');
365 365
                 }
@@ -386,7 +386,7 @@  discard block
 block discarded – undo
386 386
 	 */
387 387
 	protected function getElement($key)
388 388
 	{
389
-	    return $this->collection->filter(function ($element) use ($key) {
389
+	    return $this->collection->filter(function($element) use ($key) {
390 390
 	        return $this->getKey($element) == $key;
391 391
 	    })->first();
392 392
 	}
Please login to merge, or discard this patch.
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -137,8 +137,7 @@
 block discarded – undo
137 137
         if ($this->getElement($key) !== false)
138 138
         {
139 139
             $this->collection->set($this->collection->indexOf($value), $value);
140
-        }
141
-        else
140
+        } else
142 141
         {
143 142
             $this->collection->add($value);
144 143
         }
Please login to merge, or discard this patch.
module/Core/src/Core/Form/CollectionContainer.php 3 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -179,7 +179,7 @@
 block discarded – undo
179 179
     
180 180
     /**
181 181
      * @throws \RuntimeException
182
-     * @return Collection
182
+     * @return \Core\Entity\EntityInterface
183 183
      */
184 184
     protected function getCollection()
185 185
     {
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -80,12 +80,12 @@
 block discarded – undo
80 80
             $collection[] = $this->newEntry;
81 81
             $form = $this->buildForm($key, $this->newEntry);
82 82
             $eventManager = $form->getEventManager();
83
-			$eventManager->attach(CoreForm::EVENT_IS_VALID, function (Event $event) use ($collection) {
83
+			$eventManager->attach(CoreForm::EVENT_IS_VALID, function(Event $event) use ($collection) {
84 84
                 if (!$event->getParam('isValid')) {
85 85
                     $collection->removeElement($this->newEntry);
86 86
                 }
87 87
             });
88
-			$eventManager->attach(CoreForm::EVENT_PREPARE, function (Event $event) use ($collection) {
88
+			$eventManager->attach(CoreForm::EVENT_PREPARE, function(Event $event) use ($collection) {
89 89
                 $this->setupForm($event->getTarget(), $collection->indexOf($this->newEntry));
90 90
             });
91 91
             
Please login to merge, or discard this patch.
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -80,12 +80,12 @@  discard block
 block discarded – undo
80 80
             $collection[] = $this->newEntry;
81 81
             $form = $this->buildForm($key, $this->newEntry);
82 82
             $eventManager = $form->getEventManager();
83
-			$eventManager->attach(CoreForm::EVENT_IS_VALID, function (Event $event) use ($collection) {
83
+            $eventManager->attach(CoreForm::EVENT_IS_VALID, function (Event $event) use ($collection) {
84 84
                 if (!$event->getParam('isValid')) {
85 85
                     $collection->removeElement($this->newEntry);
86 86
                 }
87 87
             });
88
-			$eventManager->attach(CoreForm::EVENT_PREPARE, function (Event $event) use ($collection) {
88
+            $eventManager->attach(CoreForm::EVENT_PREPARE, function (Event $event) use ($collection) {
89 89
                 $this->setupForm($event->getTarget(), $collection->indexOf($this->newEntry));
90 90
             });
91 91
             
@@ -117,7 +117,7 @@  discard block
 block discarded – undo
117 117
         }
118 118
     }
119 119
     
120
-	/**
120
+    /**
121 121
      * @see \Core\Form\Element\ViewHelperProviderInterface::getViewHelper()
122 122
      */
123 123
     public function getViewHelper()
@@ -221,7 +221,7 @@  discard block
 block discarded – undo
221 221
      */
222 222
     protected function setupForm(CoreForm $form, $key)
223 223
     {
224
-         $form->setAttribute('action', sprintf('?form=%s', $this->formatAction($key)))
224
+            $form->setAttribute('action', sprintf('?form=%s', $this->formatAction($key)))
225 225
             ->setAttribute('data-entry-key', $key)
226 226
             ->setOption('control_buttons', [[
227 227
                 'class' => 'btn-danger form-collection-container-remove-button',
Please login to merge, or discard this patch.