Completed
Push — develop ( 321e68...dce9ea )
by Carsten
09:20
created
module/Core/src/Core/Mail/TranslatorAwareMessage.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -102,7 +102,7 @@
 block discarded – undo
102 102
      * </pre>
103 103
      *
104 104
      * @param string $subject
105
-     * @param bool|mixed $translate
105
+     * @param string $translate
106 106
      *
107 107
      * @since 0.19
108 108
      * @since 0.29 Add sprintf support for translation
Please login to merge, or discard this patch.
module/Core/src/Core/Factory/OptionsAbstractFactory.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -176,7 +176,7 @@
 block discarded – undo
176 176
      *
177 177
      * @param string $fullName
178 178
      *
179
-     * @return array|bool
179
+     * @return string
180 180
      */
181 181
     protected function getOptionsConfig($fullName)
182 182
     {
Please login to merge, or discard this patch.
module/Applications/src/Applications/Entity/ApplicationInterface.php 2 patches
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -240,7 +240,7 @@  discard block
 block discarded – undo
240 240
     /**
241 241
      * Gets all comments for the application.
242 242
      *
243
-     * @return ArrayCollection;
243
+     * @return Collection
244 244
 
245 245
      */
246 246
     public function getComments();
@@ -271,7 +271,7 @@  discard block
 block discarded – undo
271 271
     /**
272 272
      * Gets all attributes for an application.
273 273
      *
274
-     * @return ArrayCollection;
274
+     * @return Attributes
275 275
 
276 276
      */
277 277
     public function getAttributes();
Please login to merge, or discard this patch.
Indentation   -2 removed lines patch added patch discarded remove patch
@@ -241,7 +241,6 @@  discard block
 block discarded – undo
241 241
      * Gets all comments for the application.
242 242
      *
243 243
      * @return ArrayCollection;
244
-
245 244
      */
246 245
     public function getComments();
247 246
     
@@ -272,7 +271,6 @@  discard block
 block discarded – undo
272 271
      * Gets all attributes for an application.
273 272
      *
274 273
      * @return ArrayCollection;
275
-
276 274
      */
277 275
     public function getAttributes();
278 276
 
Please login to merge, or discard this patch.
module/Core/src/Core/View/Helper/Period.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -18,7 +18,7 @@
 block discarded – undo
18 18
      * returns the number of years of the education or work experience
19 19
      *
20 20
      * @param array $array
21
-     * @return string
21
+     * @return double
22 22
      */
23 23
     public function __invoke($array)
24 24
     {
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -25,13 +25,13 @@
 block discarded – undo
25 25
         // calculate EndDate - StartDate = X Years.
26 26
         // eg. 4.2 Years
27 27
         
28
-        $days=0;
28
+        $days = 0;
29 29
         foreach ($array as $obj) {
30 30
             $date1 = new \DateTime($obj->getEndDate());
31 31
             $date2 = new \DateTime($obj->getStartDate());
32 32
             $interval = $date1->diff($date2);
33
-            $days+=abs($interval->format('%R%a'));
33
+            $days += abs($interval->format('%R%a'));
34 34
         }
35
-        return round($days/365, 1);
35
+        return round($days / 365, 1);
36 36
     }
37 37
 }
Please login to merge, or discard this patch.
module/Jobs/src/Jobs/Controller/ManageController.php 3 patches
Doc Comments   +3 added lines, -4 removed lines patch added patch discarded remove patch
@@ -165,7 +165,6 @@  discard block
 block discarded – undo
165 165
      *
166 166
      * parameter are arbitrary elements for defaults or programming flow
167 167
      *
168
-     * @param array $parameter
169 168
      * @return null|ViewModel
170 169
      * @throws \RuntimeException
171 170
      */
@@ -388,7 +387,7 @@  discard block
 block discarded – undo
388 387
 
389 388
     /**
390 389
      * @param  $job \Jobs\Entity\Job
391
-     * @return mixed
390
+     * @return \Jobs\Form\Job
392 391
      */
393 392
     protected function getFormular($job)
394 393
     {
@@ -411,7 +410,7 @@  discard block
 block discarded – undo
411 410
     }
412 411
 
413 412
     /**
414
-     * @param $form
413
+     * @param \Jobs\Form\Job $form
415 414
      * @param array $params
416 415
      * @return ViewModel
417 416
      */
@@ -604,7 +603,7 @@  discard block
 block discarded – undo
604 603
     }
605 604
 
606 605
     /**
607
-     * @param $script
606
+     * @param string $script
608 607
      * @param array $parameter
609 608
      * @return ViewModel
610 609
      */
Please login to merge, or discard this patch.
Indentation   +47 added lines, -47 removed lines patch added patch discarded remove patch
@@ -66,16 +66,16 @@  discard block
 block discarded – undo
66 66
      */
67 67
     protected $translator;
68 68
 	
69
-	/**
70
-	 * @var FilterPluginManager
71
-	 */
69
+    /**
70
+     * @var FilterPluginManager
71
+     */
72 72
     protected $filterManager;
73 73
     
74 74
     protected $jobFormEvents;
75 75
 	
76
-	/**
77
-	 * @var
78
-	 */
76
+    /**
77
+     * @var
78
+     */
79 79
     protected $formManager;
80 80
     
81 81
     protected $options;
@@ -88,35 +88,35 @@  discard block
 block discarded – undo
88 88
     
89 89
     protected $jobEvent;
90 90
 	
91
-	/**
92
-	 * ManageController constructor.
93
-	 *
94
-	 * @TODO: [ZF3] make this controller more thin, looks like so much things to do
95
-	 *
96
-	 * @param AuthenticationService $auth
97
-	 * @param RepositoryService $repositoryService
98
-	 * @param TranslatorInterface $translator
99
-	 * @param FilterPluginManager $filterManager
100
-	 * @param EventManagerInterface $jobFormEvents
101
-	 * @param $formManager
102
-	 * @param $options
103
-	 * @param HelperPluginManager $viewHelper
104
-	 * @param ValidatorPluginManager $validatorManager
105
-	 * @param EventManagerInterface $jobEvents
106
-	 * @param EventInterface $jobEvent
107
-	 */
91
+    /**
92
+     * ManageController constructor.
93
+     *
94
+     * @TODO: [ZF3] make this controller more thin, looks like so much things to do
95
+     *
96
+     * @param AuthenticationService $auth
97
+     * @param RepositoryService $repositoryService
98
+     * @param TranslatorInterface $translator
99
+     * @param FilterPluginManager $filterManager
100
+     * @param EventManagerInterface $jobFormEvents
101
+     * @param $formManager
102
+     * @param $options
103
+     * @param HelperPluginManager $viewHelper
104
+     * @param ValidatorPluginManager $validatorManager
105
+     * @param EventManagerInterface $jobEvents
106
+     * @param EventInterface $jobEvent
107
+     */
108 108
     public function __construct(
109
-    	AuthenticationService $auth,
110
-	    RepositoryService $repositoryService,
111
-	    TranslatorInterface $translator,
112
-		FilterPluginManager $filterManager,
113
-		EventManagerInterface $jobFormEvents,
114
-		$formManager,
115
-		$options,
116
-		HelperPluginManager $viewHelper,
117
-		ValidatorPluginManager $validatorManager,
118
-		EventManagerInterface $jobEvents,
119
-		EventInterface $jobEvent
109
+        AuthenticationService $auth,
110
+        RepositoryService $repositoryService,
111
+        TranslatorInterface $translator,
112
+        FilterPluginManager $filterManager,
113
+        EventManagerInterface $jobFormEvents,
114
+        $formManager,
115
+        $options,
116
+        HelperPluginManager $viewHelper,
117
+        ValidatorPluginManager $validatorManager,
118
+        EventManagerInterface $jobEvents,
119
+        EventInterface $jobEvent
120 120
     )
121 121
     {
122 122
         $this->auth = $auth;
@@ -157,7 +157,7 @@  discard block
 block discarded – undo
157 157
         }
158 158
         $routeMatch = $e->getRouteMatch();
159 159
         $action = $routeMatch->getParam('action');
160
-	    $services = $e->getApplication()->getServiceManager();
160
+        $services = $e->getApplication()->getServiceManager();
161 161
         if (in_array($action, array('edit', 'approval', 'completion'))) {
162 162
             $jobEvents = $services->get('Jobs/Events');
163 163
             $mailSender = $services->get('Jobs/Listener/MailSender');
@@ -202,12 +202,12 @@  discard block
 block discarded – undo
202 202
         $jobEntity = $this->initializeJob()->get($this->params(), true);
203 203
 
204 204
         $model = new ViewModel([
205
-                                   'portals' => $jobEntity->getPortals(),
206
-                                   'channels' => $channels,
207
-                                   'defaultCurrencyCode' => $options->defaultCurrencyCode,
208
-                                   'defaultTaxRate' =>  $options->defaultTaxRate,
209
-                                   'jobId' => $jobEntity->getId()
210
-                               ]);
205
+                                    'portals' => $jobEntity->getPortals(),
206
+                                    'channels' => $channels,
207
+                                    'defaultCurrencyCode' => $options->defaultCurrencyCode,
208
+                                    'defaultTaxRate' =>  $options->defaultTaxRate,
209
+                                    'jobId' => $jobEntity->getId()
210
+                                ]);
211 211
         $model->setTemplate('jobs/partials/channel-list')->setTerminal(true);
212 212
         return $model;
213 213
     }
@@ -225,7 +225,7 @@  discard block
 block discarded – undo
225 225
      */
226 226
     protected function save()
227 227
     {
228
-		$formEvents = $this->jobFormEvents;
228
+        $formEvents = $this->jobFormEvents;
229 229
         $user               = $this->auth->getUser();
230 230
         if (empty($user->getInfo()->getEmail())) {
231 231
             return $this->getErrorViewModel('no-parent', array('cause' => 'noEmail'));
@@ -584,7 +584,7 @@  discard block
 block discarded – undo
584 584
             'lang/jobs/view',
585 585
             array(),
586 586
             array('query' => $query
587
-                      )
587
+                        )
588 588
         );
589 589
 
590 590
         $approvalLink = $this->url()->fromRoute(
@@ -600,10 +600,10 @@  discard block
 block discarded – undo
600 600
         );
601 601
 
602 602
         return array('job' => $jobEntity,
603
-                     'diffSnapshot' => $diff,
604
-                     'viewLink' => $viewLink,
605
-                     'approvalLink' => $approvalLink,
606
-                     'declineLink' => $declineLink);
603
+                        'diffSnapshot' => $diff,
604
+                        'viewLink' => $viewLink,
605
+                        'approvalLink' => $approvalLink,
606
+                        'declineLink' => $declineLink);
607 607
     }
608 608
 
609 609
     /**
Please login to merge, or discard this patch.
Spacing   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -227,11 +227,11 @@  discard block
 block discarded – undo
227 227
     protected function save()
228 228
     {
229 229
 		$formEvents = $this->jobFormEvents;
230
-        $user               = $this->auth->getUser();
230
+        $user = $this->auth->getUser();
231 231
         if (empty($user->getInfo()->getEmail())) {
232 232
             return $this->getErrorViewModel('no-parent', array('cause' => 'noEmail'));
233 233
         }
234
-        $userOrg            = $user->getOrganization();
234
+        $userOrg = $user->getOrganization();
235 235
         if (!$userOrg->hasAssociation() || $userOrg->getOrganization()->isDraft()) {
236 236
             return $this->getErrorViewModel('no-parent', array('cause' => 'noCompany'));
237 237
         }
@@ -261,7 +261,7 @@  discard block
 block discarded – undo
261 261
         }
262 262
 
263 263
 
264
-        $viewModel          = null;
264
+        $viewModel = null;
265 265
         $this->acl($jobEntity, 'edit');
266 266
         if ($status = $params->fromQuery('status')) {
267 267
             $this->changeStatus($jobEntity, $status);
@@ -273,11 +273,11 @@  discard block
 block discarded – undo
273 273
         $instanceForm       = null;
274 274
         $formErrorMessages = array();
275 275
 
276
-        if (isset($formIdentifier) &&  $request->isPost()) {
276
+        if (isset($formIdentifier) && $request->isPost()) {
277 277
             // at this point the form get instantiated and immediately accumulated
278 278
             $instanceForm = $form->getForm($formIdentifier);
279 279
             if (!isset($instanceForm)) {
280
-                throw new \RuntimeException('No form found for "' . $formIdentifier . '"');
280
+                throw new \RuntimeException('No form found for "'.$formIdentifier.'"');
281 281
             }
282 282
             // the id may be part of the postData, but it never should be altered
283 283
             $postData = $request->getPost();
@@ -331,20 +331,20 @@  discard block
 block discarded – undo
331 331
             $jobValid = false;
332 332
             $errorMessage[] = $this->translator->translate('Accept the Terms');
333 333
         }
334
-        $result = $formEvents->trigger('ValidateJob', $this, [ 'form' => $form ]);
334
+        $result = $formEvents->trigger('ValidateJob', $this, ['form' => $form]);
335 335
         foreach ($result as $messages) {
336 336
             if (!$messages) {
337 337
                 continue;
338 338
             }
339 339
             if (!is_array($messages)) {
340
-                $messages = [ $messages ];
340
+                $messages = [$messages];
341 341
             }
342 342
 
343 343
             $errorMessage = array_merge($errorMessage, $messages);
344 344
             $jobValid = false;
345 345
         }
346 346
 
347
-        $errorMessage = '<br />' . implode('<br />', $errorMessage);
347
+        $errorMessage = '<br />'.implode('<br />', $errorMessage);
348 348
         if ($isAjax) {
349 349
             if ($instanceForm instanceof SummaryForm) {
350 350
                 $instanceForm->setRenderMode(SummaryForm::RENDER_SUMMARY);
@@ -352,7 +352,7 @@  discard block
 block discarded – undo
352 352
             } else {
353 353
                 $viewHelper = 'form';
354 354
             }
355
-            $viewHelperManager  = $this->viewHelper;
355
+            $viewHelperManager = $this->viewHelper;
356 356
             $content = $viewHelperManager->get($viewHelper)->__invoke($instanceForm);
357 357
             $viewModel = new JsonModel(
358 358
                 array(
@@ -376,7 +376,7 @@  discard block
 block discarded – undo
376 376
                     }
377 377
                 }
378 378
             } else {
379
-                $formEvents->trigger('DisableElements', $this, [ 'form' => $form, 'job'=>$jobEntity ]);
379
+                $formEvents->trigger('DisableElements', $this, ['form' => $form, 'job'=>$jobEntity]);
380 380
                 // Job is deployed, some changes are now disabled
381 381
                 $form->enableAll();
382 382
             }
@@ -384,7 +384,7 @@  discard block
 block discarded – undo
384 384
 
385 385
             $completionLink = $this->url()->fromRoute(
386 386
                 'lang/jobs/completion',
387
-                [ 'id' => $jobEntity->getId()]
387
+                ['id' => $jobEntity->getId()]
388 388
             );
389 389
 
390 390
             $viewModel = $this->getViewModel($form);
@@ -450,7 +450,7 @@  discard block
 block discarded – undo
450 450
     protected function getFormular($job)
451 451
     {
452 452
         /* @var $forms \Zend\Form\FormElementManager\FormElementManagerV3Polyfill */
453
-        $forms    = $this->formManager;
453
+        $forms = $this->formManager;
454 454
         /* @var $container \Jobs\Form\Job */
455 455
 
456 456
         $container = $forms->get(
@@ -555,11 +555,11 @@  discard block
 block discarded – undo
555 555
         // array with differences between the last snapshot and the actual entity
556 556
         // is remains Null if there is no snapshot
557 557
         // it will be an empty array if the snapshot and the actual entity do not differ
558
-        $diff           = null;
558
+        $diff = null;
559 559
 
560 560
 
561 561
         if ($params == 'declined') {
562
-            if ($jobEntity instanceOf JobSnapshot)  {
562
+            if ($jobEntity instanceOf JobSnapshot) {
563 563
                 $jobEntity->getOriginalEntity()->changeStatus(
564 564
                     Status::ACTIVE,
565 565
                     sprintf(
@@ -634,7 +634,7 @@  discard block
 block discarded – undo
634 634
      */
635 635
     public function deactivateAction()
636 636
     {
637
-        $user           = $this->auth->getUser();
637
+        $user = $this->auth->getUser();
638 638
 
639 639
         $jobEntity = $this->initializeJob()->get($this->params());
640 640
 
Please login to merge, or discard this patch.
module/Core/src/Core/Repository/Filter/PropertyToKeywords.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -23,7 +23,7 @@  discard block
 block discarded – undo
23 23
             $entity = $value;
24 24
             $value = array();
25 25
             foreach ($entity->getSearchableProperties() as $name) {
26
-                $result = $entity->{'get' .$name}();
26
+                $result = $entity->{'get'.$name}();
27 27
                 if (is_array($result)) {
28 28
                     $value = array_merge($value, $result);
29 29
                 } else {
@@ -48,8 +48,8 @@  discard block
 block discarded – undo
48 48
         $innerPattern = StringUtils::hasPcreUnicodeSupport()
49 49
                       ? '[^\p{L}]'
50 50
                       : '[^a-z0-9ßäöü ]';
51
-        $pattern      = '~' . $innerPattern . '~isu';
52
-        $stripPattern = '~^' . $innerPattern . '+|' . $innerPattern . '+$~isu';
51
+        $pattern      = '~'.$innerPattern.'~isu';
52
+        $stripPattern = '~^'.$innerPattern.'+|'.$innerPattern.'+$~isu';
53 53
         $parts     = array();
54 54
         $textParts = explode(' ', $string);
55 55
         foreach ($textParts as $part) {
Please login to merge, or discard this patch.
module/Core/src/Core/Form/RatingFieldset.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -49,11 +49,11 @@
 block discarded – undo
49 49
         $properties = $refl->getProperties();
50 50
         
51 51
         foreach ($properties as $property) {
52
-            $name  = $property->getName();
52
+            $name = $property->getName();
53 53
             if ('_' == $name{0}) {
54 54
                 continue;
55 55
             }
56
-            $value = $rating->{'get' . $name}();
56
+            $value = $rating->{'get'.$name}();
57 57
             $input = array(
58 58
                 'type' => 'Core/Rating',
59 59
                 'name' => $name,
Please login to merge, or discard this patch.
src/Jobs/Form/Hydrator/Strategy/JobDescriptionQualificationsStrategy.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -18,7 +18,7 @@
 block discarded – undo
18 18
     {
19 19
         /* @var \Jobs\Entity\Job $value */
20 20
         $result = null;
21
-        if (method_exists($value,'getTemplateValues')) {
21
+        if (method_exists($value, 'getTemplateValues')) {
22 22
             $result = $value->getTemplateValues()->getQualifications();
23 23
         }
24 24
         return $result;
Please login to merge, or discard this patch.
module/Applications/src/Applications/Repository/Application.php 2 patches
Indentation   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -102,9 +102,9 @@  discard block
 block discarded – undo
102 102
     {
103 103
         $qb = $this->getPaginationQueryBuilder($params);
104 104
         $cursor = $qb->hydrate(false)
105
-                     ->select('_id')
106
-                     ->getQuery()
107
-                     ->execute();
105
+                        ->select('_id')
106
+                        ->getQuery()
107
+                        ->execute();
108 108
         
109 109
         $list = new PaginationList(array_keys(ArrayUtils::iteratorToArray($cursor)));
110 110
         return $list;
@@ -133,8 +133,8 @@  discard block
 block discarded – undo
133 133
     {
134 134
         $auth=$this->getService('AuthenticationService');
135 135
         $qb=$this->createQueryBuilder()
136
-                  ->field("readBy")->notIn(array($auth->getUser()->getId()))
137
-                  ->field("job")->equals(new \MongoId($job->getId()));
136
+                    ->field("readBy")->notIn(array($auth->getUser()->getId()))
137
+                    ->field("job")->equals(new \MongoId($job->getId()));
138 138
         return $qb->getQuery()->execute();
139 139
     }
140 140
 
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -131,8 +131,8 @@
 block discarded – undo
131 131
      */
132 132
     public function loadUnreadApplicationsForJob($job)
133 133
     {
134
-        $auth=$this->getService('AuthenticationService');
135
-        $qb=$this->createQueryBuilder()
134
+        $auth = $this->getService('AuthenticationService');
135
+        $qb = $this->createQueryBuilder()
136 136
                   ->field("readBy")->notIn(array($auth->getUser()->getId()))
137 137
                   ->field("job")->equals(new \MongoId($job->getId()));
138 138
         return $qb->getQuery()->execute();
Please login to merge, or discard this patch.