Passed
Push — master ( c58a40...6d37ad )
by Mathias
10:02 queued 04:27
created
module/Jobs/src/Filter/ViewModelTemplateFilterJob.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -48,7 +48,7 @@
 block discarded – undo
48 48
             'lang/jobs/view',
49 49
             [],
50 50
             [
51
-                'query' => [ 'id' => $job->getId() ],
51
+                'query' => ['id' => $job->getId()],
52 52
                 'force_canonical' => true
53 53
             ]
54 54
         );
Please login to merge, or discard this patch.
module/Jobs/src/Filter/ViewModelTemplateFilterForm.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -48,7 +48,7 @@
 block discarded – undo
48 48
             'lang/jobs/view',
49 49
             [],
50 50
             [
51
-                'query' => [ 'id' => $job->getId() ],
51
+                'query' => ['id' => $job->getId()],
52 52
                 'force_canonical' => true
53 53
             ]
54 54
         );
Please login to merge, or discard this patch.
module/Jobs/src/Entity/AtsMode.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -224,7 +224,7 @@
 block discarded – undo
224 224
      */
225 225
 	public function setOneClickApply($oneClickApply)
226 226
 	{
227
-		$this->oneClickApply = (bool)$oneClickApply;
227
+		$this->oneClickApply = (bool) $oneClickApply;
228 228
 		
229 229
 		return $this;
230 230
 	}
Please login to merge, or discard this patch.
Indentation   +32 added lines, -32 removed lines patch added patch discarded remove patch
@@ -208,13 +208,13 @@  discard block
 block discarded – undo
208 208
         return $this->email;
209 209
     }
210 210
 
211
-	/**
212
-	 * @return bool
213
-	 */
214
-	public function getOneClickApply()
215
-	{
216
-		return $this->oneClickApply;
217
-	}
211
+    /**
212
+     * @return bool
213
+     */
214
+    public function getOneClickApply()
215
+    {
216
+        return $this->oneClickApply;
217
+    }
218 218
 
219 219
 
220 220
     /**
@@ -222,29 +222,29 @@  discard block
 block discarded – undo
222 222
      *
223 223
      * @return $this
224 224
      */
225
-	public function setOneClickApply($oneClickApply)
226
-	{
227
-		$this->oneClickApply = (bool)$oneClickApply;
228
-
229
-		return $this;
230
-	}
231
-
232
-	/**
233
-	 * @return array
234
-	 */
235
-	public function getOneClickApplyProfiles()
236
-	{
237
-		return $this->oneClickApplyProfiles;
238
-	}
239
-
240
-	/**
241
-	 * @param array $oneClickApplyProfiles
242
-	 * @return AtsMode
243
-	 */
244
-	public function setOneClickApplyProfiles(array $oneClickApplyProfiles)
245
-	{
246
-		$this->oneClickApplyProfiles = $oneClickApplyProfiles;
247
-
248
-		return $this;
249
-	}
225
+    public function setOneClickApply($oneClickApply)
226
+    {
227
+        $this->oneClickApply = (bool)$oneClickApply;
228
+
229
+        return $this;
230
+    }
231
+
232
+    /**
233
+     * @return array
234
+     */
235
+    public function getOneClickApplyProfiles()
236
+    {
237
+        return $this->oneClickApplyProfiles;
238
+    }
239
+
240
+    /**
241
+     * @param array $oneClickApplyProfiles
242
+     * @return AtsMode
243
+     */
244
+    public function setOneClickApplyProfiles(array $oneClickApplyProfiles)
245
+    {
246
+        $this->oneClickApplyProfiles = $oneClickApplyProfiles;
247
+
248
+        return $this;
249
+    }
250 250
 }
Please login to merge, or discard this patch.
module/Jobs/src/Entity/StatusInterface.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -21,7 +21,7 @@  discard block
 block discarded – undo
21 21
     /**
22 22
      * A new job was created.
23 23
      */
24
-    const CREATED =  /*@translate*/ 'created';
24
+    const CREATED = /*@translate*/ 'created';
25 25
 
26 26
     /**
27 27
      * A new job is waiting for approval
@@ -36,12 +36,12 @@  discard block
 block discarded – undo
36 36
     /**
37 37
      * A Job is accepted an is going to be published
38 38
      */
39
-    const PUBLISH  = /*@translate*/ 'publish';
39
+    const PUBLISH = /*@translate*/ 'publish';
40 40
 
41 41
     /**
42 42
      * A Job is online
43 43
      */
44
-    const ACTIVE  = /*@translate*/ 'active';
44
+    const ACTIVE = /*@translate*/ 'active';
45 45
 
46 46
     /**
47 47
      * A job was is set inactive
@@ -51,7 +51,7 @@  discard block
 block discarded – undo
51 51
     /**
52 52
      * A job was expired
53 53
      */
54
-    const EXPIRED  = /*@translate*/ 'expired';
54
+    const EXPIRED = /*@translate*/ 'expired';
55 55
     
56 56
     public function __construct($status = self::CREATED);
57 57
 
Please login to merge, or discard this patch.
module/Jobs/src/Entity/Job.php 2 patches
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -428,9 +428,9 @@
 block discarded – undo
428 428
     }
429 429
     
430 430
     /**
431
-    * (non-PHPdoc)
432
-    * @see \Jobs\Entity\JobInterface::getOrganization()
433
-    */
431
+     * (non-PHPdoc)
432
+     * @see \Jobs\Entity\JobInterface::getOrganization()
433
+     */
434 434
     public function getOrganization()
435 435
     {
436 436
         return $this->organization;
Please login to merge, or discard this patch.
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -514,10 +514,10 @@  discard block
 block discarded – undo
514 514
     public function getLocation()
515 515
     {
516 516
         if (null === $this->location) {
517
-            $array=[];
517
+            $array = [];
518 518
             if (null != $this->locations) {
519 519
                 foreach ($this->locations as $location) { /* @var \Core\Entity\LocationInterface $location */
520
-                    $array[]=(string) $location;
520
+                    $array[] = (string) $location;
521 521
                 }
522 522
                 return implode(', ', $array);
523 523
             }
@@ -572,7 +572,7 @@  discard block
 block discarded – undo
572 572
             if ($removePermissions) {
573 573
                 $this->getPermissions()->revoke($this->user, Permissions::PERMISSION_ALL);
574 574
             }
575
-            $this->user=null;
575
+            $this->user = null;
576 576
         }
577 577
 
578 578
         return $this;
@@ -833,7 +833,7 @@  discard block
 block discarded – undo
833 833
         $organization = $this->organization;
834 834
         if (is_object($organization) && $organization->getImage()) {
835 835
             $organizationImage = $organization->getImage();
836
-            return "/file/Organizations.OrganizationImage/" . $organizationImage->getId();
836
+            return "/file/Organizations.OrganizationImage/".$organizationImage->getId();
837 837
         }
838 838
         return $this->logoRef;
839 839
     }
Please login to merge, or discard this patch.
module/Jobs/src/Entity/Status.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -59,12 +59,12 @@  discard block
 block discarded – undo
59 59
     {
60 60
         parent::__construct($status);
61 61
 
62
-        $constant = 'self::' . strtoupper(str_replace(' ', '_', $status));
62
+        $constant = 'self::'.strtoupper(str_replace(' ', '_', $status));
63 63
         if (!defined($constant)) {
64
-            throw new \DomainException('Unknown status: ' . $status);
64
+            throw new \DomainException('Unknown status: '.$status);
65 65
         }
66
-        $this->name=constant($constant);
67
-        $this->order=$this->getOrder();
66
+        $this->name = constant($constant);
67
+        $this->order = $this->getOrder();
68 68
     }
69 69
 
70 70
     /**
@@ -74,7 +74,7 @@  discard block
 block discarded – undo
74 74
      */
75 75
     public function getName()
76 76
     {
77
-        return isset($this->name)?$this->name:'';
77
+        return isset($this->name) ? $this->name : '';
78 78
     }
79 79
 
80 80
     /**
Please login to merge, or discard this patch.
module/Jobs/src/Entity/JobSnapshot.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -245,6 +245,6 @@
 block discarded – undo
245 245
 
246 246
     public function __toString()
247 247
     {
248
-        return self::class . '( ' . $this->getSnapshotId() . ' )';
248
+        return self::class.'( '.$this->getSnapshotId().' )';
249 249
     }
250 250
 }
Please login to merge, or discard this patch.
module/Jobs/src/Model/ApiJobDehydrator.php 1 patch
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -65,8 +65,8 @@
 block discarded – undo
65 65
             'link' => $this->jobUrl->__invoke(
66 66
                 $job,
67 67
                 [
68
-                  'linkOnly'=> true,
69
-                  'absolute' => true,
68
+                    'linkOnly'=> true,
69
+                    'absolute' => true,
70 70
                 ]
71 71
             ),
72 72
             'organization' => array(
Please login to merge, or discard this patch.
module/Jobs/src/Controller/ManageController.php 2 patches
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   +16 added lines, -16 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 \Laminas\Form\FormElementManager */
453
-        $forms    = $this->formManager;
453
+        $forms = $this->formManager;
454 454
         /* @var $container \Jobs\Form\Job */
455 455
 
456 456
         $container = $forms->get(
@@ -557,15 +557,15 @@  discard block
 block discarded – undo
557 557
         $jobEvent->setJobEntity($jobEntity);
558 558
         $jobEvent->addPortal('XingVendorApi');
559 559
         $jobEvent->setTarget($this);
560
-        $jobEvents      = $this->jobEvents;
560
+        $jobEvents = $this->jobEvents;
561 561
         // array with differences between the last snapshot and the actual entity
562 562
         // is remains Null if there is no snapshot
563 563
         // it will be an empty array if the snapshot and the actual entity do not differ
564
-        $diff           = null;
564
+        $diff = null;
565 565
 
566 566
 
567 567
         if ($params == 'declined') {
568
-            if ($jobEntity instanceOf JobSnapshot)  {
568
+            if ($jobEntity instanceOf JobSnapshot) {
569 569
                 $jobEntity->getOriginalEntity()->changeStatus(
570 570
                     Status::ACTIVE,
571 571
                     sprintf(
@@ -643,7 +643,7 @@  discard block
 block discarded – undo
643 643
      */
644 644
     public function deactivateAction()
645 645
     {
646
-        $user           = $this->auth->getUser();
646
+        $user = $this->auth->getUser();
647 647
 
648 648
         $jobEntity = $this->initializeJob()->get($this->params());
649 649
 
Please login to merge, or discard this patch.