Completed
Pull Request — develop (#245)
by ANTHONIUS
08:30
created
module/Orders/config/acl.config.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -7,7 +7,7 @@
 block discarded – undo
7 7
  * @copyright  2013 - 2016 Cross Solution <http://cross-solution.de>
8 8
  */
9 9
 
10
-return [ 'acl' => [
10
+return ['acl' => [
11 11
 
12 12
     'rules' => [
13 13
         'admin' => [
Please login to merge, or discard this patch.
module/Orders/src/Entity/Order.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -236,7 +236,7 @@  discard block
 block discarded – undo
236 236
      */
237 237
     public function setPrice($amount)
238 238
     {
239
-        $tax    = $this->getTaxRate()  / 100;
239
+        $tax = $this->getTaxRate() / 100;
240 240
         $taxAmount = $amount * $tax;
241 241
 
242 242
         $this->prices = [
@@ -248,7 +248,7 @@  discard block
 block discarded – undo
248 248
         return $this;
249 249
     }
250 250
 
251
-    public function getPrice($type="net")
251
+    public function getPrice($type = "net")
252 252
     {
253 253
         if (!$this->prices || !array_key_exists($type, $this->prices)) {
254 254
             return 0;
@@ -264,7 +264,7 @@  discard block
 block discarded – undo
264 264
      *
265 265
      * @return array
266 266
      */
267
-    public function getPrices($calculate=false)
267
+    public function getPrices($calculate = false)
268 268
     {
269 269
         /*if (!$this->prices || $calculate) {
270 270
             $this->calculatePrices();
Please login to merge, or discard this patch.
module/Orders/src/Repository/Orders.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -22,14 +22,14 @@
 block discarded – undo
22 22
  */
23 23
 class Orders extends AbstractRepository
24 24
 {
25
-    public function createJobOrder(array $data=[])
25
+    public function createJobOrder(array $data = [])
26 26
     {
27 27
         $data['type'] = OrderInterface::TYPE_JOB;
28 28
 
29 29
         return $this->create($data);
30 30
     }
31 31
 
32
-    public function create(array $data=[], $counterName = null, $counterFormat = null)
32
+    public function create(array $data = [], $counterName = null, $counterFormat = null)
33 33
     {
34 34
         if (isset($data['counter'])) {
35 35
             $counterName = $data['counter'];
Please login to merge, or discard this patch.
module/Jobs/src/Jobs/Controller/ManageController.php 3 patches
Indentation   +16 added lines, -16 removed lines patch added patch discarded remove patch
@@ -139,12 +139,12 @@  discard block
 block discarded – undo
139 139
         $jobEntity = $this->initializeJob()->get($this->params());
140 140
 
141 141
         $model = new ViewModel([
142
-                                   'portals' => $jobEntity->getPortals(),
143
-                                   'channels' => $channels,
144
-                                   'defaultCurrencyCode' => $options->defaultCurrencyCode,
145
-                                   'defaultTaxRate' =>  $options->defaultTaxRate,
146
-                                   'jobId' => $jobEntity->getId()
147
-                               ]);
142
+                                    'portals' => $jobEntity->getPortals(),
143
+                                    'channels' => $channels,
144
+                                    'defaultCurrencyCode' => $options->defaultCurrencyCode,
145
+                                    'defaultTaxRate' =>  $options->defaultTaxRate,
146
+                                    'jobId' => $jobEntity->getId()
147
+                                ]);
148 148
         $model->setTemplate('jobs/partials/channel-list')->setTerminal(true);
149 149
         return $model;
150 150
     }
@@ -440,9 +440,9 @@  discard block
 block discarded – undo
440 440
             // we want just some Values to be compared
441 441
             $diff = null;
442 442
             foreach (array('title', 'organization', 'location',
443
-                         'templateValues.qualifications', 'templateValues.requirements', 'templateValues.benefits', 'templateValues.title',
444
-                         'templateValues._freeValues.description',
445
-                     ) as $prelKey) {
443
+                            'templateValues.qualifications', 'templateValues.requirements', 'templateValues.benefits', 'templateValues.title',
444
+                            'templateValues._freeValues.description',
445
+                        ) as $prelKey) {
446 446
                 if (array_key_exists($prelKey, $prelDiff)) {
447 447
                     $diff[$prelKey] = $prelDiff[$prelKey];
448 448
                 }
@@ -471,28 +471,28 @@  discard block
 block discarded – undo
471 471
             'lang/jobs/view',
472 472
             array(),
473 473
             array('query' =>
474
-                      array( 'id' => $jobEntity->getId()))
474
+                        array( 'id' => $jobEntity->getId()))
475 475
         );
476 476
 
477 477
         $approvalLink = $this->url()->fromRoute(
478 478
             'lang/jobs/approval',
479 479
             array('state' => 'approved'),
480 480
             array('query' =>
481
-                      array( 'id' => $jobEntity->getId()))
481
+                        array( 'id' => $jobEntity->getId()))
482 482
         );
483 483
 
484 484
         $declineLink = $this->url()->fromRoute(
485 485
             'lang/jobs/approval',
486 486
             array('state' => 'declined'),
487 487
             array('query' =>
488
-                      array( 'id' => $jobEntity->getId()))
488
+                        array( 'id' => $jobEntity->getId()))
489 489
         );
490 490
 
491 491
         return array('job' => $jobEntity,
492
-                     'diffSnapshot' => $diff,
493
-                     'viewLink' => $viewLink,
494
-                     'approvalLink' => $approvalLink,
495
-                     'declineLink' => $declineLink);
492
+                        'diffSnapshot' => $diff,
493
+                        'viewLink' => $viewLink,
494
+                        'approvalLink' => $approvalLink,
495
+                        'declineLink' => $declineLink);
496 496
     }
497 497
 
498 498
     /**
Please login to merge, or discard this patch.
Doc Comments   +8 added lines, -9 removed lines patch added patch discarded remove patch
@@ -66,7 +66,7 @@  discard block
 block discarded – undo
66 66
     }
67 67
 
68 68
     /**
69
-     * @return $this|void
69
+     * @return ManageController
70 70
      */
71 71
     public function attachDefaultListeners()
72 72
     {
@@ -109,7 +109,7 @@  discard block
 block discarded – undo
109 109
     /**
110 110
      *
111 111
      *
112
-     * @return null|ViewModel
112
+     * @return ViewModel
113 113
      */
114 114
     public function editAction()
115 115
     {
@@ -124,7 +124,7 @@  discard block
 block discarded – undo
124 124
     }
125 125
 
126 126
     /**
127
-     * @return null|ViewModel
127
+     * @return ViewModel
128 128
      */
129 129
     public function saveAction()
130 130
     {
@@ -159,8 +159,7 @@  discard block
 block discarded – undo
159 159
      *
160 160
      * parameter are arbitrary elements for defaults or programming flow
161 161
      *
162
-     * @param array $parameter
163
-     * @return null|ViewModel
162
+     * @return ViewModel
164 163
      * @throws \RuntimeException
165 164
      */
166 165
     protected function save()
@@ -366,7 +365,7 @@  discard block
 block discarded – undo
366 365
 
367 366
     /**
368 367
      * @param $job
369
-     * @return mixed
368
+     * @return \Jobs\Form\Job
370 369
      */
371 370
     protected function getFormular($job)
372 371
     {
@@ -388,7 +387,7 @@  discard block
 block discarded – undo
388 387
     }
389 388
 
390 389
     /**
391
-     * @param $form
390
+     * @param \Jobs\Form\Job $form
392 391
      * @param array $params
393 392
      * @return ViewModel
394 393
      */
@@ -527,7 +526,7 @@  discard block
 block discarded – undo
527 526
     /**
528 527
      * Deactivate a job posting
529 528
      *
530
-     * @return null|ViewModel
529
+     * @return ViewModel
531 530
      */
532 531
     public function deactivateAction()
533 532
     {
@@ -564,7 +563,7 @@  discard block
 block discarded – undo
564 563
     }
565 564
 
566 565
     /**
567
-     * @param $script
566
+     * @param string $script
568 567
      * @param array $parameter
569 568
      * @return ViewModel
570 569
      */
Please login to merge, or discard this patch.
Spacing   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -172,7 +172,7 @@  discard block
 block discarded – undo
172 172
         if (empty($user->info->email)) {
173 173
             return $this->getErrorViewModel('no-parent', array('cause' => 'noEmail'));
174 174
         }
175
-        $userOrg            = $user->getOrganization();
175
+        $userOrg = $user->getOrganization();
176 176
         if (!$userOrg->hasAssociation()) {
177 177
             return $this->getErrorViewModel('no-parent', array('cause' => 'noCompany'));
178 178
         }
@@ -186,7 +186,7 @@  discard block
 block discarded – undo
186 186
 
187 187
         $jobEntity = $this->initializeJob()->get($this->params(), true);
188 188
 
189
-        $viewModel          = null;
189
+        $viewModel = null;
190 190
         $this->acl($jobEntity, 'edit');
191 191
         if ($status = $params->fromQuery('status')) {
192 192
             $this->changeStatus($jobEntity, $status);
@@ -198,11 +198,11 @@  discard block
 block discarded – undo
198 198
         $instanceForm       = null;
199 199
         $formErrorMessages = array();
200 200
 
201
-        if (isset($formIdentifier) &&  $request->isPost()) {
201
+        if (isset($formIdentifier) && $request->isPost()) {
202 202
             // at this point the form get instantiated and immediately accumulated
203 203
             $instanceForm = $form->getForm($formIdentifier);
204 204
             if (!isset($instanceForm)) {
205
-                throw new \RuntimeException('No form found for "' . $formIdentifier . '"');
205
+                throw new \RuntimeException('No form found for "'.$formIdentifier.'"');
206 206
             }
207 207
             // the id may be part of the postData, but it never should be altered
208 208
             $postData = $request->getPost();
@@ -256,20 +256,20 @@  discard block
 block discarded – undo
256 256
             $jobValid = false;
257 257
             $errorMessage[] = $this->translator->translate('Accept the Terms');
258 258
         }
259
-        $result = $formEvents->trigger('ValidateJob', $this, [ 'form' => $form ]);
259
+        $result = $formEvents->trigger('ValidateJob', $this, ['form' => $form]);
260 260
         foreach ($result as $messages) {
261 261
             if (!$messages) {
262 262
                 continue;
263 263
             }
264 264
             if (!is_array($messages)) {
265
-                $messages = [ $messages ];
265
+                $messages = [$messages];
266 266
             }
267 267
 
268 268
             $errorMessage = array_merge($errorMessage, $messages);
269 269
             $jobValid = false;
270 270
         }
271 271
 
272
-        $errorMessage = '<br />' . implode('<br />', $errorMessage);
272
+        $errorMessage = '<br />'.implode('<br />', $errorMessage);
273 273
         if ($isAjax) {
274 274
             if ($instanceForm instanceof SummaryForm) {
275 275
                 $instanceForm->setRenderMode(SummaryForm::RENDER_SUMMARY);
@@ -277,7 +277,7 @@  discard block
 block discarded – undo
277 277
             } else {
278 278
                 $viewHelper = 'form';
279 279
             }
280
-            $viewHelperManager  = $serviceLocator->get('ViewHelperManager');
280
+            $viewHelperManager = $serviceLocator->get('ViewHelperManager');
281 281
             $content = $viewHelperManager->get($viewHelper)->__invoke($instanceForm);
282 282
             $viewModel = new JsonModel(
283 283
                 array(
@@ -300,7 +300,7 @@  discard block
 block discarded – undo
300 300
                     }
301 301
                 }
302 302
             } else {
303
-                $formEvents->trigger('DisableElements', $this, [ 'form' => $form, 'job'=>$jobEntity ]);
303
+                $formEvents->trigger('DisableElements', $this, ['form' => $form, 'job'=>$jobEntity]);
304 304
                 // Job is deployed, some changes are now disabled
305 305
                 $form->enableAll();
306 306
             }
@@ -308,7 +308,7 @@  discard block
 block discarded – undo
308 308
 
309 309
             $completionLink = $this->url()->fromRoute(
310 310
                 'lang/jobs/completion',
311
-                [ 'id' => $jobEntity->getId()]
311
+                ['id' => $jobEntity->getId()]
312 312
             );
313 313
 
314 314
             $viewModel = $this->getViewModel($form);
@@ -462,7 +462,7 @@  discard block
 block discarded – undo
462 462
         // array with differences between the last snapshot and the actual entity
463 463
         // is remains Null if there is no snapshot
464 464
         // it will be an empty array if the snapshot and the actual entity do not differ
465
-        $diff           = null;
465
+        $diff = null;
466 466
         // preliminary difference, contain all differences
467 467
         $prelDiff = $this->entitySnapshot()->diff($jobEntity);
468 468
         if (isset($prelDiff)) {
@@ -500,21 +500,21 @@  discard block
 block discarded – undo
500 500
             'lang/jobs/view',
501 501
             array(),
502 502
             array('query' =>
503
-                      array( 'id' => $jobEntity->getId()))
503
+                      array('id' => $jobEntity->getId()))
504 504
         );
505 505
 
506 506
         $approvalLink = $this->url()->fromRoute(
507 507
             'lang/jobs/approval',
508 508
             array('state' => 'approved'),
509 509
             array('query' =>
510
-                      array( 'id' => $jobEntity->getId()))
510
+                      array('id' => $jobEntity->getId()))
511 511
         );
512 512
 
513 513
         $declineLink = $this->url()->fromRoute(
514 514
             'lang/jobs/approval',
515 515
             array('state' => 'declined'),
516 516
             array('query' =>
517
-                      array( 'id' => $jobEntity->getId()))
517
+                      array('id' => $jobEntity->getId()))
518 518
         );
519 519
 
520 520
         return array('job' => $jobEntity,
@@ -531,7 +531,7 @@  discard block
 block discarded – undo
531 531
      */
532 532
     public function deactivateAction()
533 533
     {
534
-        $user           = $this->auth->getUser();
534
+        $user = $this->auth->getUser();
535 535
 
536 536
         $jobEntity = $this->initializeJob()->get($this->params());
537 537
 
Please login to merge, or discard this patch.
module/Core/src/Core/Form/Element/DatePicker.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -34,7 +34,7 @@
 block discarded – undo
34 34
     }
35 35
 
36 36
     /**
37
-     * @return string|\Zend\View\Helper\HelperInterface
37
+     * @return string
38 38
      */
39 39
     public function getViewHelper()
40 40
     {
Please login to merge, or discard this patch.
Jobs/src/Jobs/Factory/Form/Hydrator/OrganizationNameHydratorFactory.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -15,7 +15,7 @@
 block discarded – undo
15 15
 /**
16 16
  *
17 17
  * @ODM\MappedSuperclass
18
-  */
18
+ */
19 19
 abstract class AbstractIdentifiableEntity extends AbstractEntity implements IdentifiableEntityInterface
20 20
 {
21 21
        
Please login to merge, or discard this patch.
module/Core/src/Core/Controller/Plugin/ContentCollector.php 2 patches
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -42,7 +42,7 @@  discard block
 block discarded – undo
42 42
     public function trigger($event, $target = null)
43 43
     {
44 44
         if (empty($this->_template) || !is_string($this->_template)) {
45
-              throw new \InvalidArgumentException('ContentCollector must have a template-name');
45
+                throw new \InvalidArgumentException('ContentCollector must have a template-name');
46 46
         }
47 47
           
48 48
         $responseCollection = $this->getController()->getEventManager()->trigger($event, $target);
@@ -50,9 +50,9 @@  discard block
 block discarded – undo
50 50
         $viewModel->setTemplate($this->_template);
51 51
         foreach ($responseCollection as $i => $response) {
52 52
             if (is_string($response)) {
53
-                      $template = $response;
54
-                      $response = new ViewModel(array('target' => $target));
55
-                      $response->setTemplate($template);
53
+                        $template = $response;
54
+                        $response = new ViewModel(array('target' => $target));
55
+                        $response->setTemplate($template);
56 56
             }
57 57
                     $viewModel->addChild($response, $this->_captureTo . $i);
58 58
         }
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -54,7 +54,7 @@
 block discarded – undo
54 54
                       $response = new ViewModel(array('target' => $target));
55 55
                       $response->setTemplate($template);
56 56
             }
57
-                    $viewModel->addChild($response, $this->_captureTo . $i);
57
+                    $viewModel->addChild($response, $this->_captureTo.$i);
58 58
         }
59 59
                 
60 60
         return $viewModel;
Please login to merge, or discard this patch.
module/Core/src/Core/Entity/EntityInterface.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -36,5 +36,5 @@
 block discarded – undo
36 36
      * @return bool
37 37
      * @throws \Core\Entity\Exception\OutOfBoundsException if the property does not exists.
38 38
      */
39
-    public function notEmpty($property, array $args=[]);
39
+    public function notEmpty($property, array $args = []);
40 40
 }
Please login to merge, or discard this patch.
module/Applications/src/Applications/Form/SettingsFieldset.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -68,7 +68,7 @@
 block discarded – undo
68 68
             array('type' => 'Zend\Form\Element\Textarea',
69 69
                         'name' => 'mailConfirmationText',
70 70
                          'options' => array('label' => /* @translate */ 'Confirmation mail text',
71
-                                            'description' => /* @translate */ 'default text of the acknowledgment of receipt mail to the applicant. The following variables can be used:<br><ul><li>##anrede_formell## = salutation. Includes gender, firstname and lastname.<li>##anrede_informell## = salutation. Includes fistname and lastname.</li><li>##job_title## = title of the jobs</li><li>##name## = name of the applicant.</li><li>##date## = date of recipt of the application.</li></ul>' ))
71
+                                            'description' => /* @translate */ 'default text of the acknowledgment of receipt mail to the applicant. The following variables can be used:<br><ul><li>##anrede_formell## = salutation. Includes gender, firstname and lastname.<li>##anrede_informell## = salutation. Includes fistname and lastname.</li><li>##job_title## = title of the jobs</li><li>##name## = name of the applicant.</li><li>##date## = date of recipt of the application.</li></ul>'))
72 72
         );
73 73
         
74 74
         $this->add(
Please login to merge, or discard this patch.
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -40,13 +40,13 @@  discard block
 block discarded – undo
40 40
     public function init()
41 41
     {
42 42
         $this->setName('emails')
43
-             ->setLabel(/* @translate */ 'E-Mail Notifications');
43
+                ->setLabel(/* @translate */ 'E-Mail Notifications');
44 44
 
45 45
         $this->add(
46 46
             array('type' => 'Zend\Form\Element\Checkbox',
47 47
                 'name' => 'mailAccess',
48 48
                 'options' => array('label' => /* @translate */ 'receive E-Mail alert',
49
-                                   'long_label' => /* @translate */ 'if checked, you\'ll be informed by mail about new applications.'),
49
+                                    'long_label' => /* @translate */ 'if checked, you\'ll be informed by mail about new applications.'),
50 50
                 )
51 51
         );
52 52
         $this->add(
@@ -60,13 +60,13 @@  discard block
 block discarded – undo
60 60
             array('type' => 'Zend\Form\Element\Checkbox',
61 61
                 'name' => 'autoConfirmMail',
62 62
                 'options' => array('label' => /* @translate */ 'confirm application immidiatly after submit',
63
-                                   'long_label' => /* @translate */ 'if checked, an application is immediatly confirmed. If unchecked confirmation is the duty of the recruiter.'),
63
+                                    'long_label' => /* @translate */ 'if checked, an application is immediatly confirmed. If unchecked confirmation is the duty of the recruiter.'),
64 64
                 )
65 65
         );
66 66
         $this->add(
67 67
             array('type' => 'Zend\Form\Element\Textarea',
68 68
                         'name' => 'mailConfirmationText',
69
-                         'options' => array('label' => /* @translate */ 'Confirmation mail text',
69
+                            'options' => array('label' => /* @translate */ 'Confirmation mail text',
70 70
                                             'description' => /* @translate */ 'default text of the acknowledgment of receipt mail to the applicant. The following variables can be used:<br><ul><li>##anrede_formell## = salutation. Includes gender, firstname and lastname.<li>##anrede_informell## = salutation. Includes fistname and lastname.</li><li>##job_title## = title of the jobs</li><li>##name## = name of the applicant.</li><li>##date## = date of recipt of the application.</li></ul>' ))
71 71
         );
72 72
         
Please login to merge, or discard this patch.