Passed
Push — master ( 35b3e4...c58a40 )
by Mathias
05:20
created
module/Jobs/src/Controller/ManageController.php 1 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.
module/Organizations/src/Form/OrganizationsNameFieldset.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
     {
49 49
         if (!$this->hydrator) {
50 50
             /* @var $formElementManager FormElementManager */
51
-            $hydrator           = new EntityHydrator();
51
+            $hydrator = new EntityHydrator();
52 52
 
53 53
             $repositoryManager = $this->repositories;
54 54
             $repOrganizationName = $repositoryManager->get('Organizations/OrganizationName');
Please login to merge, or discard this patch.
module/Applications/src/Paginator/JobSelectPaginator.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -52,7 +52,7 @@
 block discarded – undo
52 52
     {
53 53
         /* @var \Doctrine\ODM\MongoDB\Query\Builder $qb */
54 54
         $qb = $this->repository->createQueryBuilder();
55
-        $q && $qb->field('title')->equals(new Regex('/' . addslashes($q) . '/i'));
55
+        $q && $qb->field('title')->equals(new Regex('/'.addslashes($q).'/i'));
56 56
 
57 57
         $adapter = new DoctrineMongoAdapter($qb);
58 58
         parent::__construct($adapter);
Please login to merge, or discard this patch.
module/Core/src/Form/FileUploadFactory.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -85,7 +85,7 @@
 block discarded – undo
85 85
     {
86 86
         /* @var $formElementManager \Laminas\Form\FormElementManager\FormElement */
87 87
         $formElementManager = $container->get('FormElementManager');
88
-        $options=null;
88
+        $options = null;
89 89
         if ($this->options) {
90 90
             $options = $container->get($this->options);
91 91
         }
Please login to merge, or discard this patch.
module/Core/test/CoreTest/Factory/Form/Tree/SelectFactoryTest.php 1 patch
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -51,7 +51,7 @@  discard block
 block discarded – undo
51 51
         ],
52 52
     ];
53 53
 
54
-    private $inheritance = [ FactoryInterface::class];
54
+    private $inheritance = [FactoryInterface::class];
55 55
 
56 56
     public function testSetCreationOptions()
57 57
     {
@@ -69,7 +69,7 @@  discard block
 block discarded – undo
69 69
         $services = new ServiceManager();
70 70
         $forms    = new FormElementManager($services);
71 71
 
72
-        $options = [ 'test' => 'work?' ];
72
+        $options = ['test' => 'work?'];
73 73
         $this->target->setCreationOptions($options);
74 74
 
75 75
         $this->target
@@ -86,11 +86,11 @@  discard block
 block discarded – undo
86 86
     public function provideMissingOptions()
87 87
     {
88 88
         return [
89
-            [ null ],
90
-            [ [] ],
91
-            [ ['tree' => ['value' => 'test']] ],
92
-            [ ['tree' => ['entity' => 'test']] ],
93
-            [ ['tree' => ['name' => 'test']] ],
89
+            [null],
90
+            [[]],
91
+            [['tree' => ['value' => 'test']]],
92
+            [['tree' => ['entity' => 'test']]],
93
+            [['tree' => ['name' => 'test']]],
94 94
         ];
95 95
     }
96 96
 
@@ -122,10 +122,10 @@  discard block
 block discarded – undo
122 122
         $this->expectException(\RuntimeException::class);
123 123
         $this->expectExceptionMessage('Tree root not found');
124 124
 
125
-        $this->target->__invoke($services, '', ['tree' => [ 'entity' => 'testEntityRepository', 'value' => 'test']]);
125
+        $this->target->__invoke($services, '', ['tree' => ['entity' => 'testEntityRepository', 'value' => 'test']]);
126 126
     }
127 127
 
128
-    private function getServiceContainer($criteria, $root=null)
128
+    private function getServiceContainer($criteria, $root = null)
129 129
     {
130 130
         if (null === $root) {
131 131
             $root = new Node('Test');
@@ -188,9 +188,9 @@  discard block
 block discarded – undo
188 188
         $root3 = $this->createRoot('root', ['child1' => ['gChild11', 'gChild12']]);
189 189
 
190 190
         return [
191
-            [ $root1, [], ['child1' => ['label' => 'child1', 'options' => ['child1-gchild11' => 'gChild11', 'child1-gchild12' => 'gChild12']]]],
192
-            [ $root2, ['use_root_item' => true], ['root' => ['label' => 'root', 'options' => ['child1' => ['label' => 'child1', 'options' => ['child1-gchild11' => 'gChild11', 'child1-gchild12' => 'gChild12']]]]]],
193
-            [ $root3, ['allow_select_nodes' => true], ['child1-group' => ['label' => 'child1', 'options' => ['child1' => 'child1', 'child1-gchild11' => 'gChild11', 'child1-gchild12' => 'gChild12']]] ]
191
+            [$root1, [], ['child1' => ['label' => 'child1', 'options' => ['child1-gchild11' => 'gChild11', 'child1-gchild12' => 'gChild12']]]],
192
+            [$root2, ['use_root_item' => true], ['root' => ['label' => 'root', 'options' => ['child1' => ['label' => 'child1', 'options' => ['child1-gchild11' => 'gChild11', 'child1-gchild12' => 'gChild12']]]]]],
193
+            [$root3, ['allow_select_nodes' => true], ['child1-group' => ['label' => 'child1', 'options' => ['child1' => 'child1', 'child1-gchild11' => 'gChild11', 'child1-gchild12' => 'gChild12']]]]
194 194
         ];
195 195
     }
196 196
 
Please login to merge, or discard this patch.