Completed
Push — develop ( 037ef6...a650ad )
by Carsten
06:58
created
module/Orders/config/router.config.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -6,7 +6,7 @@
 block discarded – undo
6 6
  * @license MIT
7 7
  * @copyright  2013 - 2016 Cross Solution <http://cross-solution.de>
8 8
  */
9
-return [ 'router' => [ 'routes' => [ 'lang' => [ 'child_routes' => [
9
+return ['router' => ['routes' => ['lang' => ['child_routes' => [
10 10
 
11 11
     'orders' => [
12 12
         'type' => 'Segment',
Please login to merge, or discard this patch.
module/Orders/config/module.config.php 2 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -60,4 +60,4 @@
 block discarded – undo
60 60
         ],
61 61
     ],
62 62
 ];
63
-  
64 63
\ No newline at end of file
64
+    
65 65
\ No newline at end of file
Please login to merge, or discard this patch.
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -23,7 +23,7 @@  discard block
 block discarded – undo
23 23
                  * for multiple paths.
24 24
                  * example https://github.com/doctrine/DoctrineORMModule
25 25
                  */
26
-                'paths' => array( __DIR__ . '/../src/Entity'),
26
+                'paths' => array(__DIR__.'/../src/Entity'),
27 27
             ),
28 28
         ],
29 29
     ],
@@ -33,7 +33,7 @@  discard block
 block discarded – undo
33 33
         'translation_file_patterns' => array(
34 34
             array(
35 35
                 'type'     => 'gettext',
36
-                'base_dir' => __DIR__ . '/../language',
36
+                'base_dir' => __DIR__.'/../language',
37 37
                 'pattern'  => '%s.mo',
38 38
             ),
39 39
         ),
@@ -42,11 +42,11 @@  discard block
 block discarded – undo
42 42
 
43 43
     'event_manager' => [
44 44
 
45
-        'Jobs/Events' => [ 'listeners' => [
46
-            'Orders/Listener/CreateJobOrder' => [ \Jobs\Listener\Events\JobEvent::EVENT_JOB_CREATED, true ],
45
+        'Jobs/Events' => ['listeners' => [
46
+            'Orders/Listener/CreateJobOrder' => [\Jobs\Listener\Events\JobEvent::EVENT_JOB_CREATED, true],
47 47
         ]],
48 48
 
49
-        'Jobs/JobContainer/Events' => [ 'listeners' => [
49
+        'Jobs/JobContainer/Events' => ['listeners' => [
50 50
             '\Orders\Form\Listener\DisableJobInvoiceAddress' => 'DisableElements',
51 51
             'Orders\Form\Listener\InjectInvoiceAddressInJobContainer' => \Core\Form\Event\FormEvent::EVENT_INIT,
52 52
             '\Orders\Form\Listener\ValidateJobInvoiceAddress' => 'ValidateJob',
@@ -59,7 +59,7 @@  discard block
 block discarded – undo
59 59
             ],
60 60
         ],
61 61
 
62
-        'Core/AdminController/Events' => [ 'listeners' => [
62
+        'Core/AdminController/Events' => ['listeners' => [
63 63
             'Orders/Listener/AdminWidgetProvider' => \Core\Controller\AdminControllerEvent::EVENT_DASHBOARD,
64 64
         ]],
65 65
     ],
@@ -82,7 +82,7 @@  discard block
 block discarded – undo
82 82
     'view_helper_config' => [
83 83
         'headscript' => [
84 84
             'lang/orders' => [
85
-                [ \Zend\View\Helper\HeadScript::FILE, 'Orders/js/list.index.js', 'PREPEND' ],
85
+                [\Zend\View\Helper\HeadScript::FILE, 'Orders/js/list.index.js', 'PREPEND'],
86 86
                 'js/bootstrap-dialog.min.js'
87 87
             ],
88 88
         ],
Please login to merge, or discard this patch.
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   +3 added lines, -4 removed lines patch added patch discarded remove patch
@@ -159,7 +159,6 @@  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 162
      * @return null|ViewModel
164 163
      * @throws \RuntimeException
165 164
      */
@@ -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
      */
@@ -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   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -177,7 +177,7 @@  discard block
 block discarded – undo
177 177
         if (empty($user->info->email)) {
178 178
             return $this->getErrorViewModel('no-parent', array('cause' => 'noEmail'));
179 179
         }
180
-        $userOrg            = $user->getOrganization();
180
+        $userOrg = $user->getOrganization();
181 181
         if (!$userOrg->hasAssociation() || $userOrg->getOrganization()->isDraft()) {
182 182
             return $this->getErrorViewModel('no-parent', array('cause' => 'noCompany'));
183 183
         }
@@ -212,11 +212,11 @@  discard block
 block discarded – undo
212 212
         $instanceForm       = null;
213 213
         $formErrorMessages = array();
214 214
 
215
-        if (isset($formIdentifier) &&  $request->isPost()) {
215
+        if (isset($formIdentifier) && $request->isPost()) {
216 216
             // at this point the form get instantiated and immediately accumulated
217 217
             $instanceForm = $form->getForm($formIdentifier);
218 218
             if (!isset($instanceForm)) {
219
-                throw new \RuntimeException('No form found for "' . $formIdentifier . '"');
219
+                throw new \RuntimeException('No form found for "'.$formIdentifier.'"');
220 220
             }
221 221
             // the id may be part of the postData, but it never should be altered
222 222
             $postData = $request->getPost();
@@ -270,20 +270,20 @@  discard block
 block discarded – undo
270 270
             $jobValid = false;
271 271
             $errorMessage[] = $this->translator->translate('Accept the Terms');
272 272
         }
273
-        $result = $formEvents->trigger('ValidateJob', $this, [ 'form' => $form ]);
273
+        $result = $formEvents->trigger('ValidateJob', $this, ['form' => $form]);
274 274
         foreach ($result as $messages) {
275 275
             if (!$messages) {
276 276
                 continue;
277 277
             }
278 278
             if (!is_array($messages)) {
279
-                $messages = [ $messages ];
279
+                $messages = [$messages];
280 280
             }
281 281
 
282 282
             $errorMessage = array_merge($errorMessage, $messages);
283 283
             $jobValid = false;
284 284
         }
285 285
 
286
-        $errorMessage = '<br />' . implode('<br />', $errorMessage);
286
+        $errorMessage = '<br />'.implode('<br />', $errorMessage);
287 287
         if ($isAjax) {
288 288
             if ($instanceForm instanceof SummaryForm) {
289 289
                 $instanceForm->setRenderMode(SummaryForm::RENDER_SUMMARY);
@@ -291,7 +291,7 @@  discard block
 block discarded – undo
291 291
             } else {
292 292
                 $viewHelper = 'form';
293 293
             }
294
-            $viewHelperManager  = $serviceLocator->get('ViewHelperManager');
294
+            $viewHelperManager = $serviceLocator->get('ViewHelperManager');
295 295
             $content = $viewHelperManager->get($viewHelper)->__invoke($instanceForm);
296 296
             $viewModel = new JsonModel(
297 297
                 array(
@@ -314,7 +314,7 @@  discard block
 block discarded – undo
314 314
                     }
315 315
                 }
316 316
             } else {
317
-                $formEvents->trigger('DisableElements', $this, [ 'form' => $form, 'job'=>$jobEntity ]);
317
+                $formEvents->trigger('DisableElements', $this, ['form' => $form, 'job'=>$jobEntity]);
318 318
                 // Job is deployed, some changes are now disabled
319 319
                 $form->enableAll();
320 320
             }
@@ -322,7 +322,7 @@  discard block
 block discarded – undo
322 322
 
323 323
             $completionLink = $this->url()->fromRoute(
324 324
                 'lang/jobs/completion',
325
-                [ 'id' => $jobEntity->getId()]
325
+                ['id' => $jobEntity->getId()]
326 326
             );
327 327
 
328 328
             $viewModel = $this->getViewModel($form);
@@ -476,7 +476,7 @@  discard block
 block discarded – undo
476 476
         // array with differences between the last snapshot and the actual entity
477 477
         // is remains Null if there is no snapshot
478 478
         // it will be an empty array if the snapshot and the actual entity do not differ
479
-        $diff           = null;
479
+        $diff = null;
480 480
         // preliminary difference, contain all differences
481 481
         $prelDiff = $this->entitySnapshot()->diff($jobEntity);
482 482
         if (isset($prelDiff)) {
@@ -514,21 +514,21 @@  discard block
 block discarded – undo
514 514
             'lang/jobs/view',
515 515
             array(),
516 516
             array('query' =>
517
-                      array( 'id' => $jobEntity->getId()))
517
+                      array('id' => $jobEntity->getId()))
518 518
         );
519 519
 
520 520
         $approvalLink = $this->url()->fromRoute(
521 521
             'lang/jobs/approval',
522 522
             array('state' => 'approved'),
523 523
             array('query' =>
524
-                      array( 'id' => $jobEntity->getId()))
524
+                      array('id' => $jobEntity->getId()))
525 525
         );
526 526
 
527 527
         $declineLink = $this->url()->fromRoute(
528 528
             'lang/jobs/approval',
529 529
             array('state' => 'declined'),
530 530
             array('query' =>
531
-                      array( 'id' => $jobEntity->getId()))
531
+                      array('id' => $jobEntity->getId()))
532 532
         );
533 533
 
534 534
         return array('job' => $jobEntity,
@@ -545,7 +545,7 @@  discard block
 block discarded – undo
545 545
      */
546 546
     public function deactivateAction()
547 547
     {
548
-        $user           = $this->auth->getUser();
548
+        $user = $this->auth->getUser();
549 549
 
550 550
         $jobEntity = $this->initializeJob()->get($this->params());
551 551
 
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/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.
module/Applications/src/Applications/Factory/Form/AttachmentsFactory.php 2 patches
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -56,7 +56,7 @@  discard block
 block discarded – undo
56 56
      *
57 57
      * @var string
58 58
      */
59
-    protected $options="Applications/Options";
59
+    protected $options = "Applications/Options";
60 60
 
61 61
 
62 62
     /**
@@ -77,7 +77,7 @@  discard block
 block discarded – undo
77 77
              ->setIsDescriptionsEnabled(true)
78 78
              ->setDescription(
79 79
                 /*@translate*/ 'Attach images or PDF Documents to your application. Drag&drop them, or click into the attachement area. You can upload up to %sMB',
80
-                 [round($size/(1024*1024))>0? round($size/(1024*1024)):round($size/(1024*1024), 1)]
80
+                 [round($size / (1024 * 1024)) > 0 ? round($size / (1024 * 1024)) : round($size / (1024 * 1024), 1)]
81 81
              )
82 82
              ->setParam('return', 'file-uri')
83 83
              ->setLabel(/*@translate*/ 'Attachments');
Please login to merge, or discard this patch.
Indentation   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -73,14 +73,14 @@
 block discarded – undo
73 73
         $count = $options->getAttachmentsCount();
74 74
 
75 75
         $form->setIsDisableCapable(false)
76
-             ->setIsDisableElementsCapable(false)
77
-             ->setIsDescriptionsEnabled(true)
78
-             ->setDescription(
76
+                ->setIsDisableElementsCapable(false)
77
+                ->setIsDescriptionsEnabled(true)
78
+                ->setDescription(
79 79
                 /*@translate*/ 'Attach images or PDF Documents to your application. Drag&drop them, or click into the attachement area. You can upload up to %sMB',
80
-                 [round($size/(1024*1024))>0? round($size/(1024*1024)):round($size/(1024*1024), 1)]
81
-             )
82
-             ->setParam('return', 'file-uri')
83
-             ->setLabel(/*@translate*/ 'Attachments');
80
+                    [round($size/(1024*1024))>0? round($size/(1024*1024)):round($size/(1024*1024), 1)]
81
+                )
82
+                ->setParam('return', 'file-uri')
83
+                ->setLabel(/*@translate*/ 'Attachments');
84 84
 
85 85
         /** @var $file FileUpload*/
86 86
         $file = $form->get($this->fileName);
Please login to merge, or discard this patch.