Completed
Push — develop ( 037ef6...a650ad )
by Carsten
06:58
created
module/Core/src/Core/Factory/EventManager/EventManagerAbstractFactory.php 4 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -293,7 +293,7 @@
 block discarded – undo
293 293
      * @param string|array $options String is either event name or aggregate name (when name is int).
294 294
      *                              Array are the options from config. [ [event,..], method, priority, lazy]
295 295
      *
296
-     * @return array
296
+     * @return \Zend\EventManager\EventManagerInterface
297 297
      */
298 298
     protected function normalizeListenerOptions($name, $options)
299 299
     {
Please login to merge, or discard this patch.
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.
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -148,7 +148,7 @@  discard block
 block discarded – undo
148 148
         $defaults = [
149 149
             'service' => 'EventManager',
150 150
             'configure' => true,
151
-            'identifiers' => [ $name ],
151
+            'identifiers' => [$name],
152 152
             'event' => '\Zend\EventManager\Event',
153 153
             'listeners' => [],
154 154
         ];
@@ -239,7 +239,7 @@  discard block
 block discarded – undo
239 239
         foreach ($listeners as $name => $options) {
240 240
             $options = $this->normalizeListenerOptions($name, $options);
241 241
 
242
-            if ($options['lazy'] && null !== $options['attach'] ) {
242
+            if ($options['lazy'] && null !== $options['attach']) {
243 243
                 foreach ($options['attach'] as $spec) {
244 244
                     $lazyListeners[] = [
245 245
                         'service' => $options['service'],
@@ -269,7 +269,7 @@  discard block
 block discarded – undo
269 269
             }
270 270
 
271 271
             foreach ($options['attach'] as $spec) {
272
-                $callback = $spec['method'] ? [ $listener, $spec['method'] ] : $listener;
272
+                $callback = $spec['method'] ? [$listener, $spec['method']] : $listener;
273 273
                 $eventManager->attach($spec['events'], $callback, $spec['priority']);
274 274
             }
275 275
         }
@@ -340,7 +340,7 @@  discard block
 block discarded – undo
340 340
 
341 341
         if (is_string($options)) {
342 342
             /* Only an event name is provided in config */
343
-            $normalized['attach'] = [ [ 'events' => [ $options ], 'method' => null, 'priority' => 0 ] ];
343
+            $normalized['attach'] = [['events' => [$options], 'method' => null, 'priority' => 0]];
344 344
             return $normalized;
345 345
 
346 346
         }
@@ -369,7 +369,7 @@  discard block
 block discarded – undo
369 369
             } else if (is_string($opt)) {
370 370
                 if (null === $event) {
371 371
                     /* first string found is assumed to be the event name */
372
-                    $event = [ $opt ];
372
+                    $event = [$opt];
373 373
                 } else {
374 374
                     /* second string found must be a method name. */
375 375
                     $method = $opt;
@@ -385,7 +385,7 @@  discard block
 block discarded – undo
385 385
             }
386 386
         }
387 387
 
388
-        $normalized['attach'] = [ [ 'events' => $event, 'method' => $method, 'priority' => $priority ] ];
388
+        $normalized['attach'] = [['events' => $event, 'method' => $method, 'priority' => $priority]];
389 389
         $normalized['lazy']   = $lazy;
390 390
 
391 391
         return $normalized;
@@ -394,7 +394,7 @@  discard block
 block discarded – undo
394 394
     protected function normalizeEventsSpec($options)
395 395
     {
396 396
         $listenerPriority = isset($options['priority']) ? $options['priority'] : 0;
397
-        $listenerMethod   = isset($options['method'])   ? $options['method']   : '__none__';
397
+        $listenerMethod   = isset($options['method']) ? $options['method'] : '__none__';
398 398
         $events = [];
399 399
 
400 400
         foreach ($options['events'] as $event => $spec) {
@@ -414,7 +414,7 @@  discard block
 block discarded – undo
414 414
             } else if (is_array($spec)) {
415 415
                 if (isset($spec['method'])) {
416 416
                     if (!is_array($spec['method'])) {
417
-                        $spec['method'] = [ $spec['method'] ];
417
+                        $spec['method'] = [$spec['method']];
418 418
                     }
419 419
 
420 420
                     foreach ($spec['method'] as $method => $methodPriority) {
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.
module/Core/Module.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -36,7 +36,7 @@  discard block
 block discarded – undo
36 36
     public function getConsoleBanner(Console $console)
37 37
     {
38 38
         $version = `git describe 2>/dev/null`;
39
-        $name = 'YAWIK ' . trim($version);
39
+        $name = 'YAWIK '.trim($version);
40 40
         $width = $console->getWidth();
41 41
         return sprintf(
42 42
             "==%1\$s==\n%2\$s%3\$s\n**%1\$s**\n",
@@ -72,12 +72,12 @@  discard block
 block discarded – undo
72 72
         $sharedManager       = $eventManager->getSharedManager();
73 73
         
74 74
         if (!\Zend\Console\Console::isConsole()) {
75
-            $redirectCallback = function () use ($e) {
75
+            $redirectCallback = function() use ($e) {
76 76
                 $routeMatch = $e->getRouteMatch();
77 77
                 $lang = $routeMatch ? $routeMatch->getParam('lang', 'en') : 'en';
78
-                $uri    = $e->getRouter()->getBaseUrl() . '/' . $lang . '/error';
78
+                $uri = $e->getRouter()->getBaseUrl().'/'.$lang.'/error';
79 79
                 
80
-                header('Location: ' . $uri);
80
+                header('Location: '.$uri);
81 81
             };
82 82
             
83 83
             $errorHandlerListener = new ErrorHandlerListener($sm->get('ErrorLogger'), $redirectCallback);
@@ -109,7 +109,7 @@  discard block
 block discarded – undo
109 109
         
110 110
         $eventManager->attach(
111 111
             MvcEvent::EVENT_DISPATCH_ERROR,
112
-            function ($event) {
112
+            function($event) {
113 113
                 $application = $event->getApplication();
114 114
                 if ($application::ERROR_EXCEPTION == $event->getError()) {
115 115
                     $ex = $event->getParam('exception');
@@ -123,7 +123,7 @@  discard block
 block discarded – undo
123 123
         );
124 124
         $eventManager->attach(
125 125
             MvcEvent::EVENT_DISPATCH,
126
-            function ($event) use ($eventManager) {
126
+            function($event) use ($eventManager) {
127 127
                 $eventManager->trigger('postDispatch', $event);
128 128
             },
129 129
             -150
@@ -138,7 +138,7 @@  discard block
 block discarded – undo
138 138
      */
139 139
     public function getConfig()
140 140
     {
141
-        $config = include __DIR__ . '/config/module.config.php';
141
+        $config = include __DIR__.'/config/module.config.php';
142 142
         return $config;
143 143
         if (\Zend\Console\Console::isConsole()) {
144 144
             $config['doctrine']['configuration']['odm_default']['generate_proxies'] = false;
@@ -158,9 +158,9 @@  discard block
 block discarded – undo
158 158
         return array(
159 159
             'Zend\Loader\StandardAutoloader' => array(
160 160
                 'namespaces' => array(
161
-                    __NAMESPACE__ => __DIR__ . '/src/' . __NAMESPACE__,
162
-                    'CoreTest' => __DIR__ . '/test/' . 'CoreTest',
163
-                    'CoreTestUtils' => __DIR__ . '/test/CoreTestUtils',
161
+                    __NAMESPACE__ => __DIR__.'/src/'.__NAMESPACE__,
162
+                    'CoreTest' => __DIR__.'/test/'.'CoreTest',
163
+                    'CoreTestUtils' => __DIR__.'/test/CoreTestUtils',
164 164
                 ),
165 165
             ),
166 166
         );
Please login to merge, or discard this patch.
Applications/src/Applications/Factory/Listener/StatusChangeFactory.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -27,7 +27,7 @@
 block discarded – undo
27 27
      *
28 28
      * @param ServiceLocatorInterface $serviceLocator
29 29
      *
30
-     * @return mixed
30
+     * @return StatusChange
31 31
      */
32 32
     public function createService(ServiceLocatorInterface $serviceLocator)
33 33
     {
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.
module/Organizations/src/Organizations/Entity/WorkflowSettingsInterface.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -17,7 +17,7 @@  discard block
 block discarded – undo
17 17
      * @param bool $acceptApplicationByDepartmentManager
18 18
      * @return WorkflowSettings
19 19
      */
20
-    public function setAcceptApplicationByDepartmentManager( $acceptApplicationByDepartmentManager );
20
+    public function setAcceptApplicationByDepartmentManager($acceptApplicationByDepartmentManager);
21 21
 
22 22
     /**
23 23
      * Gets AcceptApplicationByDepartmentManager
@@ -32,7 +32,7 @@  discard block
 block discarded – undo
32 32
      * @param bool $assignDepartmentManagersToJobs
33 33
      * @return WorkflowSettings
34 34
      */
35
-    public function setAssignDepartmentManagersToJobs( $assignDepartmentManagersToJobs );
35
+    public function setAssignDepartmentManagersToJobs($assignDepartmentManagersToJobs);
36 36
 
37 37
     /**
38 38
      * Gets AssignDepartmentManagersToJobs
Please login to merge, or discard this patch.
module/Organizations/src/Organizations/Entity/WorkflowSettings.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -40,9 +40,9 @@  discard block
 block discarded – undo
40 40
      * @param bool $acceptApplicationByDepartmentManager
41 41
      * @return WorkflowSettings
42 42
      */
43
-    public function setAcceptApplicationByDepartmentManager( $acceptApplicationByDepartmentManager )
43
+    public function setAcceptApplicationByDepartmentManager($acceptApplicationByDepartmentManager)
44 44
     {
45
-        $this->acceptApplicationByDepartmentManager= $acceptApplicationByDepartmentManager;
45
+        $this->acceptApplicationByDepartmentManager = $acceptApplicationByDepartmentManager;
46 46
         return $this;
47 47
     }
48 48
     
@@ -62,7 +62,7 @@  discard block
 block discarded – undo
62 62
      * @param bool $assignDepartmentManagersToJobs
63 63
      * @return WorkflowSettings
64 64
      */
65
-    public function setAssignDepartmentManagersToJobs( $assignDepartmentManagersToJobs )
65
+    public function setAssignDepartmentManagersToJobs($assignDepartmentManagersToJobs)
66 66
     {
67 67
         $this->assignDepartmentManagersToJobs = $assignDepartmentManagersToJobs;
68 68
         return $this;
Please login to merge, or discard this patch.
module/Applications/src/Applications/Entity/Settings.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -142,7 +142,7 @@
 block discarded – undo
142 142
     /**
143 143
      * @return bool
144 144
      */
145
-    public function getAutoConfirmMail(){
145
+    public function getAutoConfirmMail() {
146 146
         return $this->autoConfirmMail;
147 147
     }
148 148
 }
Please login to merge, or discard this patch.
module/Applications/src/Applications/Listener/Events/ApplicationEvent.php 2 patches
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -30,17 +30,17 @@  discard block
 block discarded – undo
30 30
     /**
31 31
      * Event is fired when a new application is saved.
32 32
      */
33
-    const EVENT_APPLICATION_POST_CREATE   = 'application.post.create';
33
+    const EVENT_APPLICATION_POST_CREATE = 'application.post.create';
34 34
 
35 35
     /**
36 36
      * Event is fired when a users deleted application
37 37
      */
38
-    const EVENT_APPLICATION_PRE_DELETE   = 'application.pre.delete';
38
+    const EVENT_APPLICATION_PRE_DELETE = 'application.pre.delete';
39 39
 
40 40
     /**
41 41
      * Event is fired when the status of an application is changed
42 42
      */
43
-    const EVENT_APPLICATION_STATUS_CHANGE   = 'application.status.change';
43
+    const EVENT_APPLICATION_STATUS_CHANGE = 'application.status.change';
44 44
 
45 45
     /**
46 46
      * @var Application $application
@@ -233,12 +233,12 @@  discard block
 block discarded – undo
233 233
             $this->setApplicationEntity($params->application);
234 234
         }
235 235
 
236
-        if(is_array($params) && isset($params['user'])) {
236
+        if (is_array($params) && isset($params['user'])) {
237 237
             $this->setUser($params['user']);
238 238
             unset($params['user']);
239 239
         }
240 240
 
241
-        if(is_array($params) && isset($params['status'])) {
241
+        if (is_array($params) && isset($params['status'])) {
242 242
             $this->setStatus($params['status']);
243 243
             unset($params['status']);
244 244
         }
Please login to merge, or discard this patch.
Doc Comments   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -138,7 +138,7 @@  discard block
 block discarded – undo
138 138
     }
139 139
 
140 140
     /**
141
-     * @param $notification
141
+     * @param string $notification
142 142
      *
143 143
      * @return $this
144 144
      */
@@ -168,7 +168,7 @@  discard block
 block discarded – undo
168 168
     }
169 169
 
170 170
     /**
171
-     * @return mixed
171
+     * @return string
172 172
      */
173 173
     public function getStatus()
174 174
     {
@@ -176,7 +176,7 @@  discard block
 block discarded – undo
176 176
     }
177 177
 
178 178
     /**
179
-     * @return mixed
179
+     * @return boolean
180 180
      */
181 181
     public function isPostRequest()
182 182
     {
Please login to merge, or discard this patch.
module/Applications/src/Applications/Controller/IndexController.php 2 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -40,7 +40,7 @@
 block discarded – undo
40 40
             $params->set('by', 'me');
41 41
         }
42 42
 
43
-         //default sorting
43
+            //default sorting
44 44
         if (!isset($params['sort'])) {
45 45
             $params['sort']="-date";
46 46
         }
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -42,10 +42,10 @@
 block discarded – undo
42 42
 
43 43
          //default sorting
44 44
         if (!isset($params['sort'])) {
45
-            $params['sort']="-date";
45
+            $params['sort'] = "-date";
46 46
         }
47 47
         $params->count = 5;
48
-        $params->pageRange=5;
48
+        $params->pageRange = 5;
49 49
 
50 50
         $this->paginationParams()->setParams('Applications\Index', $params);
51 51
 
Please login to merge, or discard this patch.