Completed
Pull Request — develop (#241)
by ANTHONIUS
07:36
created
module/Core/src/Core/Form/Container.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -321,7 +321,7 @@  discard block
 block discarded – undo
321 321
         $formAction = $formInstance->getAttribute('action');
322 322
 
323 323
         if (empty($formAction)) {
324
-            $formInstance->setAttribute('action', '?form=' . $formName);
324
+            $formInstance->setAttribute('action', '?form='.$formName);
325 325
         }
326 326
 
327 327
         if (isset($form['label'])) {
@@ -386,7 +386,7 @@  discard block
 block discarded – undo
386 386
                 $spec->setParent($this);
387 387
             }
388 388
 
389
-            $spec = [ '__instance__' => $spec, 'name' => $key, 'entity' => '*' ];
389
+            $spec = ['__instance__' => $spec, 'name' => $key, 'entity' => '*'];
390 390
         }
391 391
 
392 392
         if (!is_array($spec)) {
@@ -505,7 +505,7 @@  discard block
 block discarded – undo
505 505
         }
506 506
         $this->activeForms = array_filter(
507 507
             $this->activeForms,
508
-            function ($item) use ($key) {
508
+            function($item) use ($key) {
509 509
                 return !in_array($item, $key);
510 510
             }
511 511
         );
@@ -519,7 +519,7 @@  discard block
 block discarded – undo
519 519
      * @throws \InvalidArgumentException
520 520
      * @return Container
521 521
      */
522
-    public function setEntity($entity, $key='*')
522
+    public function setEntity($entity, $key = '*')
523 523
     {
524 524
         if (!$entity instanceof EntityInterface)
525 525
         {
@@ -542,7 +542,7 @@  discard block
 block discarded – undo
542 542
      *
543 543
      * @return \Core\Entity\EntityInterface
544 544
      */
545
-    public function getEntity($key='*')
545
+    public function getEntity($key = '*')
546 546
     {
547 547
         return isset($this->entities[$key]) ? $this->entities[$key] : null;
548 548
     }
@@ -745,10 +745,10 @@  discard block
 block discarded – undo
745 745
         $actualKey = $this->getActiveFormActual();
746 746
         if (isset($actualKey)) {
747 747
             $forms = array_keys($this->forms);
748
-            $formsFlip =  array_flip($forms);
748
+            $formsFlip = array_flip($forms);
749 749
             $index = $formsFlip[$actualKey];
750 750
             if (0 < $index) {
751
-                $key = $forms[$index-1];
751
+                $key = $forms[$index - 1];
752 752
             }
753 753
         }
754 754
         return $key;
@@ -765,10 +765,10 @@  discard block
 block discarded – undo
765 765
         $actualKey = $this->getActiveFormActual();
766 766
         if (isset($actualKey)) {
767 767
             $forms = array_keys($this->forms);
768
-            $formsFlip =  array_flip($forms);
768
+            $formsFlip = array_flip($forms);
769 769
             $index = $formsFlip[$actualKey];
770 770
             if ($index < count($forms) - 1) {
771
-                $key = $forms[$index+1];
771
+                $key = $forms[$index + 1];
772 772
             }
773 773
         }
774 774
         return $key;
@@ -782,7 +782,7 @@  discard block
 block discarded – undo
782 782
      */
783 783
     public function formatAction($name)
784 784
     {
785
-        return sprintf('%s%s', $this->hasParent() ? $this->getName() . '.' : '', $name);
785
+        return sprintf('%s%s', $this->hasParent() ? $this->getName().'.' : '', $name);
786 786
     }
787 787
 
788 788
     /**
@@ -792,7 +792,7 @@  discard block
 block discarded – undo
792 792
     public function getActionFor($key)
793 793
     {
794 794
         if (isset($this->forms[$key])) {
795
-            return '?form=' . $this->formatAction($this->forms[$key]['name']);
795
+            return '?form='.$this->formatAction($this->forms[$key]['name']);
796 796
         }
797 797
     }
798 798
 }
799 799
\ No newline at end of file
Please login to merge, or discard this patch.
module/Core/src/Core/Form/CollectionContainer.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -80,12 +80,12 @@
 block discarded – undo
80 80
             $collection[] = $this->newEntry;
81 81
             $form = $this->buildForm($key, $this->newEntry);
82 82
             $eventManager = $form->getEventManager();
83
-			$eventManager->attach(CoreForm::EVENT_IS_VALID, function (Event $event) use ($collection) {
83
+			$eventManager->attach(CoreForm::EVENT_IS_VALID, function(Event $event) use ($collection) {
84 84
                 if (!$event->getParam('isValid')) {
85 85
                     $collection->removeElement($this->newEntry);
86 86
                 }
87 87
             });
88
-			$eventManager->attach(CoreForm::EVENT_PREPARE, function (Event $event) use ($collection) {
88
+			$eventManager->attach(CoreForm::EVENT_PREPARE, function(Event $event) use ($collection) {
89 89
                 $this->setupForm($event->getTarget(), $collection->indexOf($this->newEntry));
90 90
             });
91 91
             
Please login to merge, or discard this patch.
module/Core/src/Core/Form/View/Helper/FormCollectionContainer.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -56,7 +56,7 @@  discard block
 block discarded – undo
56 56
         $formContainerHelper = $view->formContainer();
57 57
         $formsMarkup = '';
58 58
 		$formTemplateWrapper = '<div class="form-collection-container-form">
59
-            <button type="button" class="btn btn-sm btn-danger pull-right form-collection-container-remove-button">' . $translator->translate('Remove') . '</button>
59
+            <button type="button" class="btn btn-sm btn-danger pull-right form-collection-container-remove-button">' . $translator->translate('Remove').'</button>
60 60
             %s
61 61
         </div>';
62 62
         
@@ -81,7 +81,7 @@  discard block
 block discarded – undo
81 81
             $container->getLabel(),
82 82
             $formsMarkup,
83 83
             $templateMarkup,
84
-            '<div class="form-collection-container-add-wrapper"><button type="button" class="btn btn-success form-collection-container-add-button">' . sprintf($translator->translate('Add %s'), $container->getLabel()) . '</button></div>'
84
+            '<div class="form-collection-container-add-wrapper"><button type="button" class="btn btn-success form-collection-container-add-button">'.sprintf($translator->translate('Add %s'), $container->getLabel()).'</button></div>'
85 85
         );
86 86
     }
87 87
 }
Please login to merge, or discard this patch.
module/Core/src/Core/Collection/IdentityWrapper.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -116,7 +116,7 @@  discard block
 block discarded – undo
116 116
      */
117 117
     public function getKeys()
118 118
     {
119
-        return $this->collection->map(function ($element) {
119
+        return $this->collection->map(function($element) {
120 120
             return $this->getKey($element);
121 121
         })->toArray();
122 122
     }
@@ -309,7 +309,7 @@  discard block
 block discarded – undo
309 309
      */
310 310
     public function offsetExists($offset)
311 311
     {
312
-        return (bool)$this->getElement($offset);
312
+        return (bool) $this->getElement($offset);
313 313
     }
314 314
     
315 315
     /**
@@ -359,7 +359,7 @@  discard block
 block discarded – undo
359 359
     {
360 360
         if (!isset($this->identityExtractor)) {
361 361
             // default identity extractor
362
-            $this->identityExtractor = function ($element) {
362
+            $this->identityExtractor = function($element) {
363 363
                 if (!is_callable([$element, 'getId'])) {
364 364
                     throw new \LogicException('$element must have getId() method');
365 365
                 }
@@ -386,7 +386,7 @@  discard block
 block discarded – undo
386 386
 	 */
387 387
 	protected function getElement($key)
388 388
 	{
389
-	    return $this->collection->filter(function ($element) use ($key) {
389
+	    return $this->collection->filter(function($element) use ($key) {
390 390
 	        return $this->getKey($element) == $key;
391 391
 	    })->first();
392 392
 	}
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
@@ -71,7 +71,7 @@  discard block
 block discarded – undo
71 71
      * @var array
72 72
      * @ODM\Collection
73 73
      */
74
-    protected $nativeLanguages=[];
74
+    protected $nativeLanguages = [];
75 75
 
76 76
 
77 77
     /**
@@ -216,7 +216,7 @@  discard block
 block discarded – undo
216 216
 
217 217
     public function setIsDraft($isDraft)
218 218
     {
219
-        $this->isDraft=$isDraft;
219
+        $this->isDraft = $isDraft;
220 220
         return $this;
221 221
     }
222 222
 
@@ -284,7 +284,7 @@  discard block
 block discarded – undo
284 284
      */
285 285
     public function setNativeLanguages($nativeLanguages)
286 286
     {
287
-        $this->nativeLanguages=$nativeLanguages;
287
+        $this->nativeLanguages = $nativeLanguages;
288 288
         return $this;
289 289
     }
290 290
 
Please login to merge, or discard this patch.
module/Cv/src/Cv/Entity/PreferredJob.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -86,7 +86,7 @@  discard block
 block discarded – undo
86 86
     
87 87
     public function setDesiredJob($desiredJob)
88 88
     {
89
-        $this->desiredJob=$desiredJob;
89
+        $this->desiredJob = $desiredJob;
90 90
         return $this;
91 91
     }
92 92
     
@@ -97,7 +97,7 @@  discard block
 block discarded – undo
97 97
 
98 98
     public function setDesiredLocation($desiredLocation)
99 99
     {
100
-        $this->desiredLocation=$desiredLocation;
100
+        $this->desiredLocation = $desiredLocation;
101 101
         return $this;
102 102
     }
103 103
 
@@ -119,7 +119,7 @@  discard block
 block discarded – undo
119 119
     
120 120
     public function setWillingnessToTravel($willingnessToTravel)
121 121
     {
122
-        $this->willingnessToTravel=$willingnessToTravel;
122
+        $this->willingnessToTravel = $willingnessToTravel;
123 123
         return $this;
124 124
     }
125 125
     
@@ -130,7 +130,7 @@  discard block
 block discarded – undo
130 130
 
131 131
     public function setExpectedSalary($expectedSalary)
132 132
     {
133
-        $this->expectedSalary=$expectedSalary;
133
+        $this->expectedSalary = $expectedSalary;
134 134
         return $this;
135 135
     }
136 136
 
Please login to merge, or discard this patch.
module/Jobs/src/Jobs/Controller/ImportController.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -82,7 +82,7 @@  discard block
 block discarded – undo
82 82
                         $entity = $repositoriesJob->findOneBy(array("applyId" => (string) $applyId));
83 83
                         if (!isset($entity)) {
84 84
                             // new Job (the more likely branch)
85
-                            $entity =$repositoriesJob->create(array("applyId" => (string) $applyId));
85
+                            $entity = $repositoriesJob->create(array("applyId" => (string) $applyId));
86 86
                         } else {
87 87
                             $createdJob = false;
88 88
                         }
@@ -125,10 +125,10 @@  discard block
 block discarded – undo
125 125
                             $entity->getPermissions()->grant($group, PermissionsInterface::PERMISSION_VIEW);
126 126
                         }
127 127
                         $result['isSaved'] = true;
128
-                        $log->info('Jobs/manage/saveJob [user: ' . $user->login . ']:' . var_export($p, true));
128
+                        $log->info('Jobs/manage/saveJob [user: '.$user->login.']:'.var_export($p, true));
129 129
 
130 130
                         if (!empty($params->companyId)) {
131
-                            $companyId                = $params->companyId . $loginSuffix;
131
+                            $companyId                = $params->companyId.$loginSuffix;
132 132
                             $repOrganization          = $repositories->get('Organizations/Organization');
133 133
                             $hydratorManager          = $services->get('hydratorManager');
134 134
                             /* @var \Organizations\Entity\Hydrator\OrganizationHydrator $hydrator */
@@ -179,7 +179,7 @@  discard block
 block discarded – undo
179 179
                             $jobLocations->clear();
180 180
                             foreach ($locations as $locData) {
181 181
                                 $location = new Location();
182
-                                $coords = array_map(function ($i) { return (float) $i; }, $locData['coordinates']);
182
+                                $coords = array_map(function($i) { return (float) $i; }, $locData['coordinates']);
183 183
                                 $location->setCountry($locData['country'])
184 184
                                          ->setRegion($locData['region'])
185 185
                                          ->setCity($locData['city'])
@@ -244,7 +244,7 @@  discard block
 block discarded – undo
244 244
                                                     break;
245 245
                                             }
246 246
                                             if (array_key_exists($portal, $result['portals'])) {
247
-                                                throw new \RuntimeException('Publisher-Events (internal error): There are two publisher registered for ' . $portal);
247
+                                                throw new \RuntimeException('Publisher-Events (internal error): There are two publisher registered for '.$portal);
248 248
                                             }
249 249
                                             $result['portals'][$portal] = $status;
250 250
                                         } else {
@@ -257,16 +257,16 @@  discard block
 block discarded – undo
257 257
                             }
258 258
                         }
259 259
                     } else {
260
-                        $log->info('Jobs/manage/saveJob [error: ' . $form->getMessages() . ']:' . var_export($p, true));
260
+                        $log->info('Jobs/manage/saveJob [error: '.$form->getMessages().']:'.var_export($p, true));
261 261
                         $result['valid Error'] = $form->getMessages();
262 262
                     }
263 263
                 }
264 264
             } else {
265
-                $log->info('Jobs/manage/saveJob [error: session lost]:' . var_export($p, true));
265
+                $log->info('Jobs/manage/saveJob [error: session lost]:'.var_export($p, true));
266 266
                 $result['message'] = 'session_id is lost';
267 267
             }
268 268
         } catch (\Exception $e) {
269
-            $result['message'] = 'exception occured: ' . $e->getMessage();
269
+            $result['message'] = 'exception occured: '.$e->getMessage();
270 270
         }
271 271
         //$services->get('Core/Log')->info('Jobs/manage/saveJob result:' . PHP_EOL . var_export($p, True));
272 272
         return new JsonModel($result);
Please login to merge, or discard this patch.
module/Cv/src/Cv/Form/SearchFormFieldset.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -121,7 +121,7 @@
 block discarded – undo
121 121
                 'attributes' => [
122 122
                     'data-placeholder' => /*@translate*/ 'please select',
123 123
                     'data-allowclear' => 'false',
124
-                    'data-searchbox' => -1,  // hide the search box
124
+                    'data-searchbox' => -1, // hide the search box
125 125
                     'required' => true, // mark label as required
126 126
                 ],
127 127
             )
Please login to merge, or discard this patch.
module/Cv/src/Cv/Repository/Filter/PaginationQuery.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -42,7 +42,7 @@
 block discarded – undo
42 42
             $queryBuilder->field('preferredJob.desiredLocations.coordinates')->geoWithinCenter(
43 43
                 $coordinates[0],
44 44
                 $coordinates[1],
45
-                (float)$params['d'] / 100
45
+                (float) $params['d'] / 100
46 46
             );
47 47
         }
48 48
 
Please login to merge, or discard this patch.