Passed
Push — master ( 0fbfd0...0a4722 )
by Carsten
11:27
created
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 1 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/JobInterface.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -198,7 +198,7 @@
 block discarded – undo
198 198
      *
199 199
      * @return UserInterface $user
200 200
      */
201
-    public function getUser() ;
201
+    public function getUser();
202 202
 
203 203
     /**
204 204
      * Gets the link to the application form
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/Controller/AdminController.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -57,9 +57,9 @@  discard block
 block discarded – undo
57 57
     {
58 58
         $params = $this->params()->fromQuery();
59 59
         return $this->pagination([
60
-            'params'    => [ 'Jobs_Admin', ['text', 'page' => 1, 'companyId', 'status' ] ],
61
-            'form'      => [ 'as' => 'form', 'Jobs/AdminSearch' ],
62
-            'paginator' => [ 'as' => 'jobs', 'Jobs/Admin' ],
60
+            'params'    => ['Jobs_Admin', ['text', 'page' => 1, 'companyId', 'status']],
61
+            'form'      => ['as' => 'form', 'Jobs/AdminSearch'],
62
+            'paginator' => ['as' => 'jobs', 'Jobs/Admin'],
63 63
         ]);
64 64
     }
65 65
 
@@ -84,7 +84,7 @@  discard block
 block discarded – undo
84 84
                     $oldStatus = $job->getStatus();
85 85
                     $job->changeStatus($post['status'], '[System] Status changed via Admin GUI.');
86 86
                     $events = $this->jobEvents;
87
-                    $events->trigger(JobEvent::EVENT_STATUS_CHANGED, $this, [ 'job' => $job, 'status' => $oldStatus ]);
87
+                    $events->trigger(JobEvent::EVENT_STATUS_CHANGED, $this, ['job' => $job, 'status' => $oldStatus]);
88 88
                 }
89 89
             }
90 90
 
@@ -96,6 +96,6 @@  discard block
 block discarded – undo
96 96
 
97 97
         $form->bind($job);
98 98
 
99
-        return [ 'form' => $form, 'job' => $job ];
99
+        return ['form' => $form, 'job' => $job];
100 100
     }
101 101
 }
Please login to merge, or discard this patch.
module/Jobs/src/Controller/JobboardController.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -67,7 +67,7 @@  discard block
 block discarded – undo
67 67
     public function attachDefaultListeners()
68 68
     {
69 69
         parent::attachDefaultListeners();
70
-        $events          = $this->getEventManager();
70
+        $events = $this->getEventManager();
71 71
         $this->defaultListener->attach($events);
72 72
         return $this;
73 73
     }
@@ -91,7 +91,7 @@  discard block
 block discarded – undo
91 91
         $getParams = $request->getQuery();
92 92
         $routeParams = $this->params()->fromRoute();
93 93
         if (isset($routeParams['q']) && !isset($getParams['q'])) {
94
-            $getParams['q']=$routeParams['q'];
94
+            $getParams['q'] = $routeParams['q'];
95 95
         }
96 96
 
97 97
         $result = $this->pagination([
Please login to merge, or discard this patch.
module/Jobs/src/Controller/ApiJobListByOrganizationController.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -41,7 +41,7 @@
 block discarded – undo
41 41
             $response->setStatusCode(Response::STATUS_CODE_404);
42 42
             return $response;
43 43
         }
44
-        $jsonModel=new JsonModel();
44
+        $jsonModel = new JsonModel();
45 45
         $jsonModel->setVariables($this->apiJobDehydrator->dehydrateList($jobs));
46 46
         $jsonModel->setJsonpCallback($callback);
47 47
 
Please login to merge, or discard this patch.
module/Jobs/src/Controller/ImportController.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -84,7 +84,7 @@  discard block
 block discarded – undo
84 84
                         $entity = $repositoriesJob->findOneBy(array("applyId" => (string) $applyId));
85 85
                         if (!isset($entity)) {
86 86
                             // new Job (the more likely branch)
87
-                            $entity =$repositoriesJob->create(array("applyId" => (string) $applyId));
87
+                            $entity = $repositoriesJob->create(array("applyId" => (string) $applyId));
88 88
                         } else {
89 89
                             $createdJob = false;
90 90
                         }
@@ -129,10 +129,10 @@  discard block
 block discarded – undo
129 129
                             $entity->getPermissions()->grant($group, PermissionsInterface::PERMISSION_VIEW);
130 130
                         }
131 131
                         $result['isSaved'] = true;
132
-                        $log->info('Jobs/manage/saveJob [user: ' . $user->getLogin() . ']:' . var_export($p, true));
132
+                        $log->info('Jobs/manage/saveJob [user: '.$user->getLogin().']:'.var_export($p, true));
133 133
 
134 134
                         if (!empty($params->companyId)) {
135
-                            $companyId                = $params->companyId . $loginSuffix;
135
+                            $companyId                = $params->companyId.$loginSuffix;
136 136
                             $repOrganization          = $repositories->get('Organizations/Organization');
137 137
                             $hydratorManager          = $services->get('HydratorManager');
138 138
                             /* @var \Organizations\Entity\Hydrator\OrganizationHydrator $hydrator */
@@ -188,7 +188,7 @@  discard block
 block discarded – undo
188 188
                             $jobLocations->clear();
189 189
                             foreach ($locations as $locData) {
190 190
                                 $location = new Location();
191
-                                $coords = array_map(function ($i) {
191
+                                $coords = array_map(function($i) {
192 192
                                     return (float) $i;
193 193
                                 }, $locData['coordinates']);
194 194
                                 $location->setCountry($locData['country'])
@@ -266,7 +266,7 @@  discard block
 block discarded – undo
266 266
                                                     break;
267 267
                                             }
268 268
                                             if (array_key_exists($portal, $result['portals'])) {
269
-                                                throw new \RuntimeException('Publisher-Events (internal error): There are two publisher registered for ' . $portal);
269
+                                                throw new \RuntimeException('Publisher-Events (internal error): There are two publisher registered for '.$portal);
270 270
                                             }
271 271
                                             $result['portals'][$portal] = $status;
272 272
                                         } else {
@@ -279,16 +279,16 @@  discard block
 block discarded – undo
279 279
                             }
280 280
                         }
281 281
                     } else {
282
-                        $log->info('Jobs/manage/saveJob [error: ' . $form->getMessages() . ']:' . var_export($p, true));
282
+                        $log->info('Jobs/manage/saveJob [error: '.$form->getMessages().']:'.var_export($p, true));
283 283
                         $result['valid Error'] = $form->getMessages();
284 284
                     }
285 285
                 }
286 286
             } else {
287
-                $log->info('Jobs/manage/saveJob [error: session lost]:' . var_export($p, true));
287
+                $log->info('Jobs/manage/saveJob [error: session lost]:'.var_export($p, true));
288 288
                 $result['message'] = 'session_id is lost';
289 289
             }
290 290
         } catch (\Exception $e) {
291
-            $result['message'] = 'exception occured: ' . $e->getMessage();
291
+            $result['message'] = 'exception occured: '.$e->getMessage();
292 292
         }
293 293
         //$services->get('Core/Log')->info('Jobs/manage/saveJob result:' . PHP_EOL . var_export($p, True));
294 294
         return new JsonModel($result);
Please login to merge, or discard this patch.