Completed
Push — develop ( 037ef6...a650ad )
by Carsten
06:58
created
module/Core/src/Core/Controller/FileController.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -50,7 +50,7 @@  discard block
 block discarded – undo
50 50
         $response      = $this->getResponse();
51 51
         
52 52
         try {
53
-            $repository = $this->serviceLocator->get('repositories')->get($module . '/' . $entityName);
53
+            $repository = $this->serviceLocator->get('repositories')->get($module.'/'.$entityName);
54 54
         } catch (\Exception $e) {
55 55
             $response->setStatusCode(404);
56 56
             $this->getEvent()->setParam('exception', $e);
@@ -84,7 +84,7 @@  discard block
 block discarded – undo
84 84
         
85 85
         $this->acl($file);
86 86
 
87
-        $headers=$response->getHeaders();
87
+        $headers = $response->getHeaders();
88 88
 
89 89
         $headers->addHeaderline('Content-Type', $file->getType())
90 90
             ->addHeaderline('Content-Length', $file->getLength());
Please login to merge, or discard this patch.
module/Core/src/Core/Controller/Plugin/Mail.php 3 patches
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -168,7 +168,7 @@  discard block
 block discarded – undo
168 168
         } elseif (isset($this->config['templateHalf'])) {
169 169
             $template = $this->config['templateHalf'];
170 170
         } else {
171
-              throw new \InvalidArgumentException('Not template provided for Mail.');
171
+                throw new \InvalidArgumentException('Not template provided for Mail.');
172 172
         }
173 173
         return $template;
174 174
     }
@@ -181,19 +181,19 @@  discard block
 block discarded – undo
181 181
             $from = $this->config['from'];
182 182
         } else {
183 183
             $log->err('A from email address must be provided (Variable $from) in Template: ' . $template);
184
-              throw new \InvalidArgumentException('A from email address must be provided (Variable $from) in Template: ' . $template);
184
+                throw new \InvalidArgumentException('A from email address must be provided (Variable $from) in Template: ' . $template);
185 185
         }
186 186
         if (isset($this->config['fromName'])) {
187 187
             $fromName = $this->config['fromName'];
188 188
         } else {
189 189
             $log->err('A from name must be provided (Variable $fromName) in Template: ' . $template);
190
-              throw new \InvalidArgumentException('A from name must be provided (Variable $fromName) in Template: ' . $template);
190
+                throw new \InvalidArgumentException('A from name must be provided (Variable $fromName) in Template: ' . $template);
191 191
         }
192 192
         if (isset($this->config['subject'])) {
193 193
             $subject = $this->config['subject'];
194 194
         } else {
195 195
             $log->err('A subject must be provided (Variable $subject) in Template: ' . $template);
196
-              throw new \InvalidArgumentException('A subject must be provided (Variable $subject) in Template: ' . $template);
196
+                throw new \InvalidArgumentException('A subject must be provided (Variable $subject) in Template: ' . $template);
197 197
         }
198 198
         $this->setFrom($from, $fromName);
199 199
         $this->setSubject($subject);
Please login to merge, or discard this patch.
Doc Comments   +6 added lines patch added patch discarded remove patch
@@ -72,6 +72,9 @@  discard block
 block discarded – undo
72 72
         return $this;
73 73
     }
74 74
     
75
+    /**
76
+     * @param AddressList $header
77
+     */
75 78
     protected function stringFromMailHeader($header)
76 79
     {
77 80
         $erg = '';
@@ -160,6 +163,9 @@  discard block
 block discarded – undo
160 163
         }
161 164
     }
162 165
     
166
+    /**
167
+     * @return string
168
+     */
163 169
     protected function getTemplate()
164 170
     {
165 171
         $template = null;
Please login to merge, or discard this patch.
Spacing   +17 added lines, -17 removed lines patch added patch discarded remove patch
@@ -96,18 +96,18 @@  discard block
 block discarded – undo
96 96
         $replyTo = $this->stringFromMailHeader($this->getReplyTo());
97 97
         
98 98
         return str_pad($template, 30)
99
-                . 'to: ' . str_pad($to, 50)
100
-                . 'cc: ' . str_pad($cc, 50)
101
-                . 'bcc: ' . str_pad($bcc, 50)
102
-                . 'from: ' . str_pad($from, 50)
103
-                . 'replyTo: ' . str_pad($replyTo, 50)
99
+                . 'to: '.str_pad($to, 50)
100
+                . 'cc: '.str_pad($cc, 50)
101
+                . 'bcc: '.str_pad($bcc, 50)
102
+                . 'from: '.str_pad($from, 50)
103
+                . 'replyTo: '.str_pad($replyTo, 50)
104 104
                 //. str_pad(implode(',', ArrayUtils::iteratorToArray($this->getSender())),50)
105
-                . 'subject: ' . str_pad($this->getSubject(), 50);
105
+                . 'subject: '.str_pad($this->getSubject(), 50);
106 106
     }
107 107
     
108 108
     public function template($template)
109 109
     {
110
-        $controller =  get_class($this->controller);
110
+        $controller = get_class($this->controller);
111 111
         $services = $this->serviceManager;
112 112
         
113 113
         $event = new Event();
@@ -124,11 +124,11 @@  discard block
 block discarded – undo
124 124
         $controllerIdentifier = strtolower(substr($controller, 0, strpos($controller, '\\')));
125 125
         $viewResolver = $this->serviceManager->get('ViewResolver');
126 126
                 
127
-        $templateHalf = 'mail/' . $template;
127
+        $templateHalf = 'mail/'.$template;
128 128
         $resource = $viewResolver->resolve($templateHalf);
129 129
         
130 130
         if (empty($resource)) {
131
-            $templateFull = $controllerIdentifier . '/mail/' . $template;
131
+            $templateFull = $controllerIdentifier.'/mail/'.$template;
132 132
             $resource = $viewResolver->resolve($templateFull);
133 133
         }
134 134
         
@@ -155,7 +155,7 @@  discard block
 block discarded – undo
155 155
                     unset($__vars[$key]);
156 156
                 }
157 157
             }
158
-            unset($__vars['content'],$__vars['controllerIdentifier'],$__vars['controller'],$__vars['resource'],$__vars['template'],$__vars['viewResolver']);
158
+            unset($__vars['content'], $__vars['controllerIdentifier'], $__vars['controller'], $__vars['resource'], $__vars['template'], $__vars['viewResolver']);
159 159
             $this->config = $__vars;
160 160
         }
161 161
     }
@@ -180,20 +180,20 @@  discard block
 block discarded – undo
180 180
         if (isset($this->config['from'])) {
181 181
             $from = $this->config['from'];
182 182
         } else {
183
-            $log->err('A from email address must be provided (Variable $from) in Template: ' . $template);
184
-              throw new \InvalidArgumentException('A from email address must be provided (Variable $from) in Template: ' . $template);
183
+            $log->err('A from email address must be provided (Variable $from) in Template: '.$template);
184
+              throw new \InvalidArgumentException('A from email address must be provided (Variable $from) in Template: '.$template);
185 185
         }
186 186
         if (isset($this->config['fromName'])) {
187 187
             $fromName = $this->config['fromName'];
188 188
         } else {
189
-            $log->err('A from name must be provided (Variable $fromName) in Template: ' . $template);
190
-              throw new \InvalidArgumentException('A from name must be provided (Variable $fromName) in Template: ' . $template);
189
+            $log->err('A from name must be provided (Variable $fromName) in Template: '.$template);
190
+              throw new \InvalidArgumentException('A from name must be provided (Variable $fromName) in Template: '.$template);
191 191
         }
192 192
         if (isset($this->config['subject'])) {
193 193
             $subject = $this->config['subject'];
194 194
         } else {
195
-            $log->err('A subject must be provided (Variable $subject) in Template: ' . $template);
196
-              throw new \InvalidArgumentException('A subject must be provided (Variable $subject) in Template: ' . $template);
195
+            $log->err('A subject must be provided (Variable $subject) in Template: '.$template);
196
+              throw new \InvalidArgumentException('A subject must be provided (Variable $subject) in Template: '.$template);
197 197
         }
198 198
         $this->setFrom($from, $fromName);
199 199
         $this->setSubject($subject);
@@ -215,7 +215,7 @@  discard block
 block discarded – undo
215 215
             $erg = true;
216 216
             $log->info($this);
217 217
         } catch (\Exception $e) {
218
-            $log->err('Mail failure ' . $e->getMessage());
218
+            $log->err('Mail failure '.$e->getMessage());
219 219
             //$this->serviceManager->get('Core/Log')->warn('Mail failure ' . $e->getMessage());
220 220
         }
221 221
         //}
Please login to merge, or discard this patch.
module/Core/src/Core/Listener/DefaultListener.php 1 patch
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.
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 1 patch
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.
module/Auth/src/Auth/Form/UserPassword.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -56,6 +56,6 @@
 block discarded – undo
56 56
         $form = new static();
57 57
         $form->forms = $forms;
58 58
         
59
-		return $form;
59
+        return $form;
60 60
     }
61 61
 }
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.