Completed
Push — develop ( 8b432d...18f015 )
by Mathias
05:26
created
module/Organizations/src/Organizations/Controller/ProfileController.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -82,7 +82,7 @@  discard block
 block discarded – undo
82 82
     {
83 83
 
84 84
         $result = $this->pagination([
85
-            'params' => ['Organizations_Profile',[
85
+            'params' => ['Organizations_Profile', [
86 86
                     'q',
87 87
                     'count' => $this->options['count'],
88 88
                     'page' => 1,
@@ -116,7 +116,7 @@  discard block
 block discarded – undo
116 116
         $repo            = $this->repo;
117 117
         $id              = $this->params('id');
118 118
 
119
-        if(is_null($id)){
119
+        if (is_null($id)) {
120 120
             $this->getResponse()->setStatusCode(Response::STATUS_CODE_404);
121 121
             return [
122 122
                 'message' => $translator->translate('Can not access profile page without id'),
@@ -125,20 +125,20 @@  discard block
 block discarded – undo
125 125
         }
126 126
 
127 127
         $organization = $repo->find($id);
128
-        if(!$organization instanceof Organization){
128
+        if (!$organization instanceof Organization) {
129 129
             throw new NotFoundException($id);
130 130
         }
131 131
 
132
-        if(
132
+        if (
133 133
             Organization::PROFILE_DISABLED == $organization->getProfileSetting()
134 134
             || is_null($organization->getProfileSetting())
135
-        ){
135
+        ) {
136 136
             throw new UnauthorizedAccessException(/*@translate*/ 'This Organization Profile is disabled');
137 137
         }
138 138
 
139 139
         $result = $this->pagination([
140 140
             'params' => [
141
-                'Organization_Jobs',[
141
+                'Organization_Jobs', [
142 142
                     'q',
143 143
                     'organization_id' => $id,
144 144
                     'count' => $this->options['count'],
@@ -151,13 +151,13 @@  discard block
 block discarded – undo
151 151
             ],
152 152
         ]);
153 153
 
154
-        if(
154
+        if (
155 155
             Organization::PROFILE_ACTIVE_JOBS == $organization->getProfileSetting()
156
-        ){
156
+        ) {
157 157
             /* @var \Zend\Paginator\Paginator $paginator */
158 158
             $paginator = $result['jobs'];
159 159
             $count = $paginator->getTotalItemCount();
160
-            if(0===$count){
160
+            if (0 === $count) {
161 161
                 throw new UnauthorizedAccessException($this->translator->translate('This Organization Profile is disabled'));
162 162
             }
163 163
         }
Please login to merge, or discard this patch.
module/Jobs/src/Jobs/Listener/MailSender.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -62,7 +62,7 @@  discard block
 block discarded – undo
62 62
         $this->options = array_merge($this->options, $options);
63 63
     }
64 64
 
65
-    public function attach(EventManagerInterface $events, $priority=1)
65
+    public function attach(EventManagerInterface $events, $priority = 1)
66 66
     {
67 67
         $this->listeners[] = $events->attach(JobEvent::EVENT_JOB_CREATED, array($this, 'onJobCreated'));
68 68
         $this->listeners[] = $events->attach(JobEvent::EVENT_JOB_ACCEPTED, array($this, 'onJobAccepted'));
@@ -152,7 +152,7 @@  discard block
 block discarded – undo
152 152
         if ($adminMail) {
153 153
             $mail->setTo($this->options['adminEmail']);
154 154
         } else {
155
-            if (! ($user = $job->getUser()) ) { return; }
155
+            if (!($user = $job->getUser())) { return; }
156 156
             $userInfo  = $user->getInfo();
157 157
             $userEmail = $userInfo->getEmail();
158 158
             $userName  = $userInfo->getDisplayName(/*emailIfEmpty*/ false);
Please login to merge, or discard this patch.
module/Jobs/src/Jobs/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 \Zend\Form\FormElementManager\FormElementManagerV3Polyfill */
453
-        $forms    = $this->formManager;
453
+        $forms = $this->formManager;
454 454
         /* @var $container \Jobs\Form\Job */
455 455
 
456 456
         $container = $forms->get(
@@ -552,15 +552,15 @@  discard block
 block discarded – undo
552 552
         $jobEvent->setJobEntity($jobEntity);
553 553
         $jobEvent->addPortal('XingVendorApi');
554 554
         $jobEvent->setTarget($this);
555
-        $jobEvents      = $this->jobEvents;
555
+        $jobEvents = $this->jobEvents;
556 556
         // array with differences between the last snapshot and the actual entity
557 557
         // is remains Null if there is no snapshot
558 558
         // it will be an empty array if the snapshot and the actual entity do not differ
559
-        $diff           = null;
559
+        $diff = null;
560 560
 
561 561
 
562 562
         if ($params == 'declined') {
563
-            if ($jobEntity instanceOf JobSnapshot)  {
563
+            if ($jobEntity instanceOf JobSnapshot) {
564 564
                 $jobEntity->getOriginalEntity()->changeStatus(
565 565
                     Status::ACTIVE,
566 566
                     sprintf(
@@ -638,7 +638,7 @@  discard block
 block discarded – undo
638 638
      */
639 639
     public function deactivateAction()
640 640
     {
641
-        $user           = $this->auth->getUser();
641
+        $user = $this->auth->getUser();
642 642
 
643 643
         $jobEntity = $this->initializeJob()->get($this->params());
644 644
 
Please login to merge, or discard this patch.
module/Jobs/src/Jobs/Controller/ConsoleController.php 1 patch
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -55,9 +55,9 @@  discard block
 block discarded – undo
55 55
         }
56 56
 
57 57
         $date = new \DateTime('today');
58
-        $date->sub(new \DateInterval('P' . $days . 'D'));
58
+        $date->sub(new \DateInterval('P'.$days.'D'));
59 59
 
60
-        $query        = [
60
+        $query = [
61 61
             '$and' => [
62 62
                 ['status.name' => StatusInterface::ACTIVE],
63 63
                 ['$or' => [
@@ -73,7 +73,7 @@  discard block
 block discarded – undo
73 73
 
74 74
         $offset = 0;
75 75
         if ($limit && false !== strpos($limit, ',')) {
76
-            list($limit,$offset) = explode(',', $limit);
76
+            list($limit, $offset) = explode(',', $limit);
77 77
         }
78 78
 
79 79
         $jobs = $jobsRepo->findBy($query, null, (int) $limit, (int) $offset);
@@ -84,9 +84,9 @@  discard block
 block discarded – undo
84 84
         }
85 85
 
86 86
         if ($info) {
87
-            echo count($jobs) , ' Jobs';
88
-            if ($offset) { echo ' starting from ' . $offset; }
89
-            echo PHP_EOL . PHP_EOL;
87
+            echo count($jobs), ' Jobs';
88
+            if ($offset) { echo ' starting from '.$offset; }
89
+            echo PHP_EOL.PHP_EOL;
90 90
             $this->listExpiredJobs($jobs);
91 91
             return;
92 92
         }
@@ -97,7 +97,7 @@  discard block
 block discarded – undo
97 97
 //
98 98
         echo "$count jobs found, which have to expire ...\n";
99 99
         
100
-        $progress     = new ProgressBar(
100
+        $progress = new ProgressBar(
101 101
             new ConsoleAdapter(
102 102
                 array(
103 103
                 'elements' => array(
@@ -120,7 +120,7 @@  discard block
 block discarded – undo
120 120
 
121 121
         /* @var \Jobs\Entity\Job $job */
122 122
         foreach ($jobs as $job) {
123
-            $progress->update($i++, 'Job ' . $i . ' / ' . $count);
123
+            $progress->update($i++, 'Job '.$i.' / '.$count);
124 124
 
125 125
             $job->changeStatus('expired');
126 126
 
@@ -148,7 +148,7 @@  discard block
 block discarded – undo
148 148
         $i            = 0;
149 149
         /* @var Job $job */
150 150
         foreach ($jobs as $job) {
151
-            $progress->update($i++, 'Job ' . $i . ' / ' . $count);
151
+            $progress->update($i++, 'Job '.$i.' / '.$count);
152 152
             
153 153
             $permissions = $job->getPermissions();
154 154
             $user        = $job->getUser();
@@ -156,7 +156,7 @@  discard block
 block discarded – undo
156 156
                 continue;
157 157
             }
158 158
             try {
159
-                $group       = $user->getGroup($job->getCompany());
159
+                $group = $user->getGroup($job->getCompany());
160 160
             } catch (\Exception $e) {
161 161
                 continue;
162 162
             }
@@ -195,7 +195,7 @@  discard block
 block discarded – undo
195 195
                 $org = $job->getCompany();
196 196
             }
197 197
             printf(
198
-                '%s   %s   %s   %-30s   %-20s' . PHP_EOL,
198
+                '%s   %s   %s   %-30s   %-20s'.PHP_EOL,
199 199
                 $id,
200 200
                 $job->getDatePublishStart()->format('Y-m-d'),
201 201
                 $job->getDatePublishEnd()->format('Y-m-d'),
@@ -203,6 +203,6 @@  discard block
 block discarded – undo
203 203
                 substr($org, 0, 20)
204 204
             );
205 205
         }
206
-        return count($jobs) . ' Jobs.';
206
+        return count($jobs).' Jobs.';
207 207
     }
208 208
 }
Please login to merge, or discard this patch.
module/Jobs/src/Jobs/Entity/Job.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -513,10 +513,10 @@  discard block
 block discarded – undo
513 513
     public function getLocation()
514 514
     {
515 515
         if (null === $this->location) {
516
-            $array=[];
517
-            if(null != $this->locations){
516
+            $array = [];
517
+            if (null != $this->locations) {
518 518
                 foreach ($this->locations as $location) { /* @var \Core\Entity\LocationInterface $location */
519
-                    $array[]=(string) $location;
519
+                    $array[] = (string) $location;
520 520
                 }
521 521
                 return implode(', ', $array);
522 522
             }
@@ -571,7 +571,7 @@  discard block
 block discarded – undo
571 571
             if ($removePermissions) {
572 572
                 $this->getPermissions()->revoke($this->user, Permissions::PERMISSION_ALL);
573 573
             }
574
-            $this->user=null;
574
+            $this->user = null;
575 575
         }
576 576
 
577 577
         return $this;
@@ -579,8 +579,8 @@  discard block
 block discarded – undo
579 579
 
580 580
     public function unsetOrganization($removePermissions = true)
581 581
     {
582
-        if($this->organization && $removePermissions){
583
-            $this->getPermissions()->revoke($this->organization,Permissions::PERMISSION_ALL);
582
+        if ($this->organization && $removePermissions) {
583
+            $this->getPermissions()->revoke($this->organization, Permissions::PERMISSION_ALL);
584 584
         }
585 585
 
586 586
         $this->organization = null;
@@ -832,7 +832,7 @@  discard block
 block discarded – undo
832 832
         $organization = $this->organization;
833 833
         if (is_object($organization) && $organization->getImage()) {
834 834
             $organizationImage = $organization->getImage();
835
-            return "/file/Organizations.OrganizationImage/" . $organizationImage->getId();
835
+            return "/file/Organizations.OrganizationImage/".$organizationImage->getId();
836 836
         }
837 837
         return $this->logoRef;
838 838
     }
Please login to merge, or discard this patch.
module/Jobs/src/Jobs/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/Jobs/Model/ApiJobDehydrator.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -63,7 +63,7 @@
 block discarded – undo
63 63
             'title' => $job->getTitle(),
64 64
             'location' => $job->getLocation(),
65 65
             'link' => $this->jobUrl->__invoke(
66
-                $job,[
66
+                $job, [
67 67
                   'linkOnly'=> true,
68 68
                   'absolute' => true,
69 69
                 ]
Please login to merge, or discard this patch.
module/Cv/src/Cv/Entity/Cv.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -82,7 +82,7 @@  discard block
 block discarded – undo
82 82
      * @var array
83 83
      * @ODM\Field(type="collection")
84 84
      */
85
-    protected $nativeLanguages=[];
85
+    protected $nativeLanguages = [];
86 86
 
87 87
 
88 88
     /**
@@ -267,7 +267,7 @@  discard block
 block discarded – undo
267 267
      */
268 268
     public function setIsDraft($isDraft)
269 269
     {
270
-        $this->isDraft=$isDraft;
270
+        $this->isDraft = $isDraft;
271 271
         return $this;
272 272
     }
273 273
 
@@ -337,7 +337,7 @@  discard block
 block discarded – undo
337 337
      */
338 338
     public function setNativeLanguages($nativeLanguages)
339 339
     {
340
-        $this->nativeLanguages=$nativeLanguages;
340
+        $this->nativeLanguages = $nativeLanguages;
341 341
         return $this;
342 342
     }
343 343
 
Please login to merge, or discard this patch.
module/Jobs/src/Jobs/Entity/Decorator/JsonLdProvider.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -52,7 +52,7 @@  discard block
 block discarded – undo
52 52
         $dateStart = $this->job->getDatePublishStart();
53 53
         $dateStart = $dateStart ? $dateStart->format('Y-m-d') : null;
54 54
 	    
55
-        $array=[
55
+        $array = [
56 56
             '@context'=>'http://schema.org/',
57 57
             '@type' => 'JobPosting',
58 58
             'title' => $this->job->getTitle(),
@@ -85,16 +85,16 @@  discard block
 block discarded – undo
85 85
      *
86 86
      * @return array
87 87
      */
88
-    private function getLocations($locations){
89
-        $array=[];
90
-        foreach($locations as $location){ /* @var \Core\Entity\LocationInterface $location */
88
+    private function getLocations($locations) {
89
+        $array = [];
90
+        foreach ($locations as $location) { /* @var \Core\Entity\LocationInterface $location */
91 91
             array_push(
92 92
                 $array,
93 93
                 [
94 94
                     '@type' => 'Place',
95 95
                     'address' => [
96 96
                         '@type' => 'PostalAddress',
97
-                        'streetAddress' => $location->getStreetname() .' '.$location->getStreetnumber(),
97
+                        'streetAddress' => $location->getStreetname().' '.$location->getStreetnumber(),
98 98
                         'postalCode' => $location->getPostalCode(),
99 99
                         'addressLocality' => $location->getCity(),
100 100
                         'addressCountry' => $location->getCountry(),
@@ -114,7 +114,7 @@  discard block
 block discarded – undo
114 114
      */
115 115
     private function getDescription(TemplateValuesInterface $values) {
116 116
 
117
-        $description=sprintf(
117
+        $description = sprintf(
118 118
             "<p>%s</p>".
119 119
             "<h1>%s</h1>".
120 120
             "<h3>Requirements</h3><p>%s</p>".
Please login to merge, or discard this patch.