Completed
Push — develop ( fd8298...e653e2 )
by Carsten
14s
created
public/index.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -13,14 +13,14 @@  discard block
 block discarded – undo
13 13
 
14 14
 if (php_sapi_name() == 'cli-server') {
15 15
     $route = parse_url(substr($_SERVER["REQUEST_URI"], 1))["path"];
16
-    if (is_file(__DIR__ . '/' . $route)) {
17
-        if(substr($route, -4) == ".php"){
18
-            require __DIR__ . '/' . $route;     // Include requested script files
16
+    if (is_file(__DIR__.'/'.$route)) {
17
+        if (substr($route, -4) == ".php") {
18
+            require __DIR__.'/'.$route; // Include requested script files
19 19
             exit;
20 20
         }
21
-        return false;           // Serve file as is
21
+        return false; // Serve file as is
22 22
     } else {                    // Fallback to index.php
23
-        $_GET["q"] = $route;    // Try to emulate the behaviour of a .htaccess here.
23
+        $_GET["q"] = $route; // Try to emulate the behaviour of a .htaccess here.
24 24
     }
25 25
 }
26 26
 
@@ -40,8 +40,8 @@  discard block
 block discarded – undo
40 40
 } else {
41 41
     echo '<p>Could not initialize autoloading. This happens, if the dependencies are not installed yet.</p>';
42 42
     echo '<p>Please try to install the dependencies via: </p>';
43
-    echo '<code>cd '. realpath('.') .'<br>./install.sh</code>';
44
-    echo '<p>exit at ' . __FILE__ . ' in line ' . __LINE__ .'</p>';
43
+    echo '<code>cd '.realpath('.').'<br>./install.sh</code>';
44
+    echo '<p>exit at '.__FILE__.' in line '.__LINE__.'</p>';
45 45
     exit;
46 46
 }
47 47
 
Please login to merge, or discard this patch.
module/Jobs/src/Jobs/Filter/ChannelPrices.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -73,15 +73,15 @@
 block discarded – undo
73 73
             if ('yawik' == $channelKey) {
74 74
                 $absoluteDiscount = 100;
75 75
             }
76
-            if ($channel instanceof ChannelOptions && $channel->getPrice('base')>0) {
76
+            if ($channel instanceof ChannelOptions && $channel->getPrice('base') > 0) {
77 77
                 $sum += $channel->getPrice('base');
78 78
                 $amount++;
79 79
             }
80 80
         }
81
-        $discount=1-($amount-1)*13.5/100;
82
-        if ($discount>0) {
83
-            $sum= round($sum * $discount, 2);
81
+        $discount = 1 - ($amount - 1) * 13.5 / 100;
82
+        if ($discount > 0) {
83
+            $sum = round($sum * $discount, 2);
84 84
         }
85
-        return $sum-$absoluteDiscount;
85
+        return $sum - $absoluteDiscount;
86 86
     }
87 87
 }
Please login to merge, or discard this patch.
module/Organizations/src/Organizations/Filter/Recipients.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -34,10 +34,10 @@
 block discarded – undo
34 34
      */
35 35
     public function filter($value)
36 36
     {
37
-        if (!$value instanceof Job){
37
+        if (!$value instanceof Job) {
38 38
 
39 39
         }
40
-        $reciptients=[];
40
+        $reciptients = [];
41 41
 
42 42
         return $reciptients;
43 43
     }
Please login to merge, or discard this patch.
module/Auth/src/Auth/Adapter/HybridAuth.php 1 patch
Indentation   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -211,14 +211,14 @@
 block discarded – undo
211 211
     {
212 212
         return $this->repository;
213 213
     }
214
-	/**
215
-	 * @param SocialProfilePlugin
216
-	 * @return HybridAuth
217
-	 */
218
-	public function setSocialProfilePlugin(SocialProfilePlugin $socialProfilePlugin)
219
-	{
220
-		$this->socialProfilePlugin = $socialProfilePlugin;
214
+    /**
215
+     * @param SocialProfilePlugin
216
+     * @return HybridAuth
217
+     */
218
+    public function setSocialProfilePlugin(SocialProfilePlugin $socialProfilePlugin)
219
+    {
220
+        $this->socialProfilePlugin = $socialProfilePlugin;
221 221
 		
222
-		return $this;
223
-	}
222
+        return $this;
223
+    }
224 224
 }
Please login to merge, or discard this patch.
module/Auth/src/Auth/Form/SocialProfiles.php 2 patches
Indentation   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -61,14 +61,14 @@
 block discarded – undo
61 61
         return $this->useDefaultValidation ? \Zend\Form\Form::isValid() : parent::isValid();
62 62
     }
63 63
     
64
-	/**
65
-	 * @param bool $bool
66
-	 * @return SocialProfiles
67
-	 */
68
-	public function setUseDefaultValidation($bool)
69
-	{
70
-		$this->useDefaultValidation = (bool)$bool;
64
+    /**
65
+     * @param bool $bool
66
+     * @return SocialProfiles
67
+     */
68
+    public function setUseDefaultValidation($bool)
69
+    {
70
+        $this->useDefaultValidation = (bool)$bool;
71 71
 		
72
-		return $this;
73
-	}
72
+        return $this;
73
+    }
74 74
 }
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -67,7 +67,7 @@
 block discarded – undo
67 67
 	 */
68 68
 	public function setUseDefaultValidation($bool)
69 69
 	{
70
-		$this->useDefaultValidation = (bool)$bool;
70
+		$this->useDefaultValidation = (bool) $bool;
71 71
 		
72 72
 		return $this;
73 73
 	}
Please login to merge, or discard this patch.
module/Auth/src/Auth/Controller/ManageController.php 2 patches
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -96,8 +96,7 @@
 block discarded – undo
96 96
                     'content' => $content,
97 97
                     )
98 98
                 );
99
-            }
100
-            elseif ($postProfiles) {
99
+            } elseif ($postProfiles) {
101 100
                 $formSocialProfiles->setData($this->params()->fromPost());
102 101
                 
103 102
                 if ($formSocialProfiles->isValid()) {
Please login to merge, or discard this patch.
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -44,11 +44,11 @@  discard block
 block discarded – undo
44 44
         /* @var \Auth\Form\UserProfileContainer $container */
45 45
         $container = $forms->get('Auth/userprofilecontainer');
46 46
         $user = $serviceLocator->get('AuthenticationService')->getUser(); /* @var $user \Auth\Entity\User */
47
-        $postProfiles = (array)$this->params()->fromPost('social_profiles');
47
+        $postProfiles = (array) $this->params()->fromPost('social_profiles');
48 48
         $userProfiles = $user->getProfile();
49 49
         $formSocialProfiles = $forms->get('Auth/SocialProfiles')
50 50
             ->setUseDefaultValidation(true)
51
-            ->setData(['social_profiles' => array_map(function ($array)
51
+            ->setData(['social_profiles' => array_map(function($array)
52 52
             {
53 53
                 return $array['data'];
54 54
             }, $userProfiles)]);
@@ -131,7 +131,7 @@  discard block
 block discarded – undo
131 131
                                 ));
132 132
                             } else {
133 133
                                 $profile = [
134
-                                    'auth' => (array)$authProfile,
134
+                                    'auth' => (array) $authProfile,
135 135
                                     'data' => \Zend\Json\Json::decode($dataProfiles[$network])
136 136
                                 ];
137 137
                                 $user->addProfile($network, $profile);
@@ -141,7 +141,7 @@  discard block
 block discarded – undo
141 141
                 }
142 142
                 
143 143
                 // keep data in sync & properly decoded
144
-                $formSocialProfiles->setData(['social_profiles' => array_map(function ($array)
144
+                $formSocialProfiles->setData(['social_profiles' => array_map(function($array)
145 145
                 {
146 146
                     return \Zend\Json\Json::decode($array) ?: '';
147 147
                 }, $dataProfiles)]);
Please login to merge, or discard this patch.
module/Core/src/Core/Form/Container.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -98,7 +98,7 @@
 block discarded – undo
98 98
     /**
99 99
      * Gets an iterator to iterate over the enabled formulars.
100 100
      *
101
-     * @return \ArrayIterator
101
+     * @return PriorityList
102 102
      * @see IteratorAggregate::getIterator()
103 103
      */
104 104
     public function getIterator()
Please login to merge, or discard this patch.
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -321,7 +321,7 @@  discard block
 block discarded – undo
321 321
         $formAction = $formInstance->getAttribute('action');
322 322
 
323 323
         if (empty($formAction)) {
324
-            $formInstance->setAttribute('action', '?form=' . $formName);
324
+            $formInstance->setAttribute('action', '?form='.$formName);
325 325
         }
326 326
 
327 327
         if (isset($form['label'])) {
@@ -386,7 +386,7 @@  discard block
 block discarded – undo
386 386
                 $spec->setParent($this);
387 387
             }
388 388
 
389
-            $spec = [ '__instance__' => $spec, 'name' => $key, 'entity' => '*' ];
389
+            $spec = ['__instance__' => $spec, 'name' => $key, 'entity' => '*'];
390 390
         }
391 391
 
392 392
         if (!is_array($spec)) {
@@ -505,7 +505,7 @@  discard block
 block discarded – undo
505 505
         }
506 506
         $this->activeForms = array_filter(
507 507
             $this->activeForms,
508
-            function ($item) use ($key) {
508
+            function($item) use ($key) {
509 509
                 return !in_array($item, $key);
510 510
             }
511 511
         );
@@ -519,7 +519,7 @@  discard block
 block discarded – undo
519 519
      * @throws \InvalidArgumentException
520 520
      * @return Container
521 521
      */
522
-    public function setEntity($entity, $key='*')
522
+    public function setEntity($entity, $key = '*')
523 523
     {
524 524
         if (!$entity instanceof EntityInterface)
525 525
         {
@@ -542,7 +542,7 @@  discard block
 block discarded – undo
542 542
      *
543 543
      * @return \Core\Entity\EntityInterface
544 544
      */
545
-    public function getEntity($key='*')
545
+    public function getEntity($key = '*')
546 546
     {
547 547
         return isset($this->entities[$key]) ? $this->entities[$key] : null;
548 548
     }
@@ -745,10 +745,10 @@  discard block
 block discarded – undo
745 745
         $actualKey = $this->getActiveFormActual();
746 746
         if (isset($actualKey)) {
747 747
             $forms = array_keys($this->forms);
748
-            $formsFlip =  array_flip($forms);
748
+            $formsFlip = array_flip($forms);
749 749
             $index = $formsFlip[$actualKey];
750 750
             if (0 < $index) {
751
-                $key = $forms[$index-1];
751
+                $key = $forms[$index - 1];
752 752
             }
753 753
         }
754 754
         return $key;
@@ -765,10 +765,10 @@  discard block
 block discarded – undo
765 765
         $actualKey = $this->getActiveFormActual();
766 766
         if (isset($actualKey)) {
767 767
             $forms = array_keys($this->forms);
768
-            $formsFlip =  array_flip($forms);
768
+            $formsFlip = array_flip($forms);
769 769
             $index = $formsFlip[$actualKey];
770 770
             if ($index < count($forms) - 1) {
771
-                $key = $forms[$index+1];
771
+                $key = $forms[$index + 1];
772 772
             }
773 773
         }
774 774
         return $key;
@@ -782,7 +782,7 @@  discard block
 block discarded – undo
782 782
      */
783 783
     public function formatAction($name)
784 784
     {
785
-        return sprintf('%s%s', $this->hasParent() ? $this->getName() . '.' : '', $name);
785
+        return sprintf('%s%s', $this->hasParent() ? $this->getName().'.' : '', $name);
786 786
     }
787 787
 
788 788
     /**
@@ -792,7 +792,7 @@  discard block
 block discarded – undo
792 792
     public function getActionFor($key)
793 793
     {
794 794
         if (isset($this->forms[$key])) {
795
-            return '?form=' . $this->formatAction($this->forms[$key]['name']);
795
+            return '?form='.$this->formatAction($this->forms[$key]['name']);
796 796
         }
797 797
     }
798 798
 }
799 799
\ No newline at end of file
Please login to merge, or discard this patch.
module/Core/src/Core/Factory/EventManager/EventManagerAbstractFactory.php 4 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -278,7 +278,7 @@
 block discarded – undo
278 278
             /* @var \Core\Listener\DeferredListenerAggregate $aggregate */
279 279
             $aggregate = $services->get('Core/Listener/DeferredListenerAggregate');
280 280
             $aggregate->setListeners($lazyListeners)
281
-                      ->attach($eventManager);
281
+                        ->attach($eventManager);
282 282
         }
283 283
     }
284 284
 
Please login to merge, or discard this patch.
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -209,8 +209,7 @@
 block discarded – undo
209 209
             /* @var \Zend\EventManager\EventInterface $event */
210 210
             $event = $services->has($config['event']) ? $services->get($config['event']) : new $config['event']();
211 211
             $events->setEventPrototype($event);
212
-        }
213
-        else {
212
+        } else {
214 213
             $events->setEventClass($config['event']);
215 214
         }
216 215
 
Please login to merge, or discard this patch.
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -113,7 +113,7 @@  discard block
 block discarded – undo
113 113
      * @param  string             $requestedName
114 114
      * @param  null|array         $options
115 115
      *
116
-     * @return object
116
+     * @return \Zend\EventManager\EventManagerInterface
117 117
      * @throws ServiceNotFoundException if unable to resolve the service.
118 118
      * @throws ServiceNotCreatedException if an exception is raised when
119 119
      *     creating a service.
@@ -333,7 +333,7 @@  discard block
 block discarded – undo
333 333
      * @param string|array $options String is either event name or aggregate name (when name is int).
334 334
      *                              Array are the options from config. [ [event,..], method, priority, lazy]
335 335
      *
336
-     * @return array
336
+     * @return \Zend\EventManager\EventManagerInterface
337 337
      */
338 338
     protected function normalizeListenerOptions($name, $options)
339 339
     {
Please login to merge, or discard this patch.
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -164,7 +164,7 @@  discard block
 block discarded – undo
164 164
      */
165 165
     public function createServiceWithName(ServiceLocatorInterface $serviceLocator, $name, $requestedName)
166 166
     {
167
-        return $this($serviceLocator,$requestedName);
167
+        return $this($serviceLocator, $requestedName);
168 168
     }
169 169
 
170 170
     /**
@@ -183,7 +183,7 @@  discard block
 block discarded – undo
183 183
         $defaults = [
184 184
             'service' => 'EventManager',
185 185
             'configure' => true,
186
-            'identifiers' => [ $name ],
186
+            'identifiers' => [$name],
187 187
             'event' => '\Zend\EventManager\Event',
188 188
             'listeners' => [],
189 189
         ];
@@ -274,7 +274,7 @@  discard block
 block discarded – undo
274 274
         foreach ($listeners as $name => $options) {
275 275
             $options = $this->normalizeListenerOptions($name, $options);
276 276
 
277
-            if ($options['lazy'] && null !== $options['attach'] ) {
277
+            if ($options['lazy'] && null !== $options['attach']) {
278 278
                 foreach ($options['attach'] as $spec) {
279 279
                     $lazyListeners[] = [
280 280
                         'service' => $options['service'],
@@ -304,7 +304,7 @@  discard block
 block discarded – undo
304 304
             }
305 305
 
306 306
             foreach ($options['attach'] as $spec) {
307
-                $callback = $spec['method'] ? [ $listener, $spec['method'] ] : $listener;
307
+                $callback = $spec['method'] ? [$listener, $spec['method']] : $listener;
308 308
                 $eventManager->attach($spec['events'], $callback, $spec['priority']);
309 309
             }
310 310
         }
@@ -375,7 +375,7 @@  discard block
 block discarded – undo
375 375
 
376 376
         if (is_string($options)) {
377 377
             /* Only an event name is provided in config */
378
-            $normalized['attach'] = [ [ 'events' => [ $options ], 'method' => null, 'priority' => 0 ] ];
378
+            $normalized['attach'] = [['events' => [$options], 'method' => null, 'priority' => 0]];
379 379
             return $normalized;
380 380
 
381 381
         }
@@ -404,7 +404,7 @@  discard block
 block discarded – undo
404 404
             } else if (is_string($opt)) {
405 405
                 if (null === $event) {
406 406
                     /* first string found is assumed to be the event name */
407
-                    $event = [ $opt ];
407
+                    $event = [$opt];
408 408
                 } else {
409 409
                     /* second string found must be a method name. */
410 410
                     $method = $opt;
@@ -420,7 +420,7 @@  discard block
 block discarded – undo
420 420
             }
421 421
         }
422 422
 
423
-        $normalized['attach'] = [ [ 'events' => $event, 'method' => $method, 'priority' => $priority ] ];
423
+        $normalized['attach'] = [['events' => $event, 'method' => $method, 'priority' => $priority]];
424 424
         $normalized['lazy']   = $lazy;
425 425
 
426 426
         return $normalized;
@@ -429,7 +429,7 @@  discard block
 block discarded – undo
429 429
     protected function normalizeEventsSpec($options)
430 430
     {
431 431
         $listenerPriority = isset($options['priority']) ? $options['priority'] : 0;
432
-        $listenerMethod   = isset($options['method'])   ? $options['method']   : '__none__';
432
+        $listenerMethod   = isset($options['method']) ? $options['method'] : '__none__';
433 433
         $events = [];
434 434
 
435 435
         foreach ($options['events'] as $event => $spec) {
@@ -449,7 +449,7 @@  discard block
 block discarded – undo
449 449
             } else if (is_array($spec)) {
450 450
                 if (isset($spec['method'])) {
451 451
                     if (!is_array($spec['method'])) {
452
-                        $spec['method'] = [ $spec['method'] ];
452
+                        $spec['method'] = [$spec['method']];
453 453
                     }
454 454
 
455 455
                     foreach ($spec['method'] as $method => $methodPriority) {
Please login to merge, or discard this patch.
module/Applications/src/Applications/Listener/StatusChange.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -157,7 +157,7 @@
 block discarded – undo
157 157
 
158 158
     /**
159 159
      * @param Application $application
160
-     * @param             $status
160
+     * @param             string $status
161 161
      *
162 162
      * @return AddressList
163 163
      */
Please login to merge, or discard this patch.
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -68,7 +68,7 @@  discard block
 block discarded – undo
68 68
      *
69 69
      * @param ApplicationEvent $e
70 70
      */
71
-    public function prepareFormData(ApplicationEvent $e){
71
+    public function prepareFormData(ApplicationEvent $e) {
72 72
         if ($e->isPostRequest()) {
73 73
             return;
74 74
         }
@@ -95,13 +95,13 @@  discard block
 block discarded – undo
95 95
                 $key = 'mailRejectionText';
96 96
                 break;
97 97
             default:
98
-                throw new \InvalidArgumentException('Unknown status value: ' .$status);
98
+                throw new \InvalidArgumentException('Unknown status value: '.$status);
99 99
         }
100
-        $mailText      = $settings->$key ? $settings->$key : '';
100
+        $mailText = $settings->$key ? $settings->$key : '';
101 101
         $mail->setBody($mailText);
102 102
         $mail->setApplication($this->application);
103 103
         $mailText = $mail->getBodyText();
104
-        $mailSubject   = sprintf(
104
+        $mailSubject = sprintf(
105 105
             $this->translator->translate('Your application dated %s'),
106 106
             strftime('%x', $this->application->getDateCreated()->getTimestamp())
107 107
         );
@@ -121,7 +121,7 @@  discard block
 block discarded – undo
121 121
      *
122 122
      * @param ApplicationEvent $event
123 123
      */
124
-    public function  sendMail(ApplicationEvent $event){
124
+    public function  sendMail(ApplicationEvent $event) {
125 125
         if (!$event->isPostRequest()) {
126 126
             return;
127 127
         }
@@ -167,7 +167,7 @@  discard block
 block discarded – undo
167 167
         $this->mailService->send($mail);
168 168
 
169 169
 
170
-        $historyText = sprintf($this->translator->translate('Mail was sent to %s'), key($recipient) ?: $recipient[0] );
170
+        $historyText = sprintf($this->translator->translate('Mail was sent to %s'), key($recipient) ?: $recipient[0]);
171 171
         $this->application->changeStatus($status, $historyText);
172 172
         $event->setNotification($historyText);
173 173
     }
@@ -178,7 +178,7 @@  discard block
 block discarded – undo
178 178
      *
179 179
      * @return AddressList
180 180
      */
181
-    protected function getRecipient( Application $application, $status) {
181
+    protected function getRecipient(Application $application, $status) {
182 182
 
183 183
         $recipient = Status::ACCEPTED == $status
184 184
             ? $application->getJob()->getUser()->getInfo()
@@ -187,7 +187,7 @@  discard block
 block discarded – undo
187 187
         $email = $recipient->getEmail();
188 188
         $name  = $recipient->getDisplayName(false);
189 189
 
190
-        return $name ? [ $email => $name ] : [ $email ];
190
+        return $name ? [$email => $name] : [$email];
191 191
     }
192 192
 
193 193
 }
194 194
\ No newline at end of file
Please login to merge, or discard this patch.