Completed
Pull Request — develop (#245)
by ANTHONIUS
08:30
created
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.
module/Core/src/Core/Factory/EventManager/EventManagerAbstractFactory.php 1 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.
module/Core/src/Core/Form/View/Helper/FormFileUpload.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -103,12 +103,12 @@  discard block
 block discarded – undo
103 103
     </a>
104 104
     <div class="fu-errors input-error">
105 105
         <ul class="errors">
106
-            <li class="fu-error-size">' . $translator->translate('The file is too big', $textDomain) . '</li>
107
-            <li class="fu-error-type">' . $translator->translate('The file type is not supported', $textDomain) . '</li>
106
+            <li class="fu-error-size">' . $translator->translate('The file is too big', $textDomain).'</li>
107
+            <li class="fu-error-type">' . $translator->translate('The file type is not supported', $textDomain).'</li>
108 108
             <li class="fu-error-count">' . sprintf(
109 109
     $translator->translate('You may only upload %d files', $textDomain),
110 110
     $element->getAttribute('data-maxfilecount')
111
-) . '</li><li class="fu-error-general">' . $translator->translate('An unknown error occured.') . '</li>
111
+).'</li><li class="fu-error-general">'.$translator->translate('An unknown error occured.').'</li>
112 112
         </ul>
113 113
    </div>
114 114
 </li>';
@@ -116,7 +116,7 @@  discard block
 block discarded – undo
116 116
         /* @var $basepath \Zend\View\Helper\BasePath */
117 117
         $renderer          = $this->getView();
118 118
         $basepath          = $renderer->plugin('basepath');
119
-        $createFileDisplay = function ($file) use ($template, $basepath) {
119
+        $createFileDisplay = function($file) use ($template, $basepath) {
120 120
             /* @var $file \Core\Entity\FileInterface */
121 121
             $uri  = $basepath($file->getUri());
122 122
             $name = $file->getName();
@@ -153,15 +153,15 @@  discard block
 block discarded – undo
153 153
         }
154 154
 
155 155
         $notice         =
156
-            '<small>' . $translator->translate('Click here to add files or use drag and drop.') . '</small>';
156
+            '<small>'.$translator->translate('Click here to add files or use drag and drop.').'</small>';
157 157
         $nonemptynotice =
158
-            '<div class="fu-nonempty-notice"' . ('' == trim($preview) ? ' style="display:none;"' : '') . '>'
159
-            . $notice . '</div>';
158
+            '<div class="fu-nonempty-notice"'.('' == trim($preview) ? ' style="display:none;"' : '').'>'
159
+            . $notice.'</div>';
160 160
         $emptynotice    = '<div class="fu-empty-notice"'
161
-                          . ('' == trim($preview) ? '' : ' style="display: none;"') . '>
161
+                          . ('' == trim($preview) ? '' : ' style="display: none;"').'>
162 162
                        <div class="pull-left">
163 163
                             <span class="yk-icon fa-files-o fa-5x"></span>
164
-                        </div>' . $notice . '
164
+                        </div>' . $notice.'
165 165
                   </div>';
166 166
 
167 167
         $markup = '
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/Organization.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -335,7 +335,7 @@  discard block
 block discarded – undo
335 335
      */
336 336
     public function getPermissionsResourceId()
337 337
     {
338
-        return 'organization:' . $this->getId();
338
+        return 'organization:'.$this->getId();
339 339
     }
340 340
 
341 341
     /**
@@ -547,7 +547,7 @@  discard block
 block discarded – undo
547 547
      * @param string $role
548 548
      * @return ArrayCollection
549 549
      */
550
-    public function getEmployeesByRole($role){
550
+    public function getEmployeesByRole($role) {
551 551
         $employees = new ArrayCollection();
552 552
 
553 553
         /* @var \Organizations\Entity\Employee $employee */
@@ -665,7 +665,7 @@  discard block
 block discarded – undo
665 665
      */
666 666
     public function getTemplate()
667 667
     {
668
-        if (null === $this->template){
668
+        if (null === $this->template) {
669 669
             $this->template = new Template();
670 670
         }
671 671
         return $this->template;
@@ -678,7 +678,7 @@  discard block
 block discarded – undo
678 678
      */
679 679
     public function setTemplate(TemplateInterface $template)
680 680
     {
681
-        $this->template=$template;
681
+        $this->template = $template;
682 682
         return $this;
683 683
     }
684 684
 
@@ -687,7 +687,7 @@  discard block
 block discarded – undo
687 687
      *
688 688
      * @return WorkflowSettings|WorkflowSettingsInterface
689 689
      */
690
-    public function getWorkflowSettings(){
690
+    public function getWorkflowSettings() {
691 691
         if (null == $this->workflowSettings) {
692 692
             $this->workflowSettings = new WorkflowSettings();
693 693
         }
@@ -701,8 +701,8 @@  discard block
 block discarded – undo
701 701
      *
702 702
      * @return self
703 703
      */
704
-    public function setWorkflowSettings($workflowSettings){
705
-        $this->workflowSettings=$workflowSettings;
704
+    public function setWorkflowSettings($workflowSettings) {
705
+        $this->workflowSettings = $workflowSettings;
706 706
         return $this;
707 707
     }
708 708
 }
709 709
\ No newline at end of file
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 1 patch
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.
module/Applications/src/Applications/Controller/IndexController.php 1 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.