Completed
Push — develop ( 3d2ac1...0e6c87 )
by
unknown
13:24
created
module/Cv/src/Cv/Form/NativeLanguageFieldset.php 1 patch
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -124,9 +124,9 @@
 block discarded – undo
124 124
     public function init()
125 125
     {
126 126
         $this->setName('nativeLanguages')
127
-             ->setHydrator(new EntityHydrator())
128
-             ->setObject(new NativeLanguageEntity())
129
-             ->setLabel('Native Language');
127
+                ->setHydrator(new EntityHydrator())
128
+                ->setObject(new NativeLanguageEntity())
129
+                ->setLabel('Native Language');
130 130
 
131 131
 
132 132
         $this->add(
Please login to merge, or discard this patch.
module/Cv/src/Cv/Entity/Cv.php 3 patches
Indentation   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -60,11 +60,11 @@
 block discarded – undo
60 60
     protected $skills;
61 61
 
62 62
     /**
63
-    * Skills
64
-    *
65
-    * @var ArrayCollection
66
-    * @ODM\EmbedMany(targetDocument="\Cv\Entity\Language")
67
-    */
63
+     * Skills
64
+     *
65
+     * @var ArrayCollection
66
+     * @ODM\EmbedMany(targetDocument="\Cv\Entity\Language")
67
+     */
68 68
     protected $languageSkills;
69 69
 
70 70
     /**
Please login to merge, or discard this patch.
Doc Comments   +8 added lines, -5 removed lines patch added patch discarded remove patch
@@ -186,7 +186,7 @@  discard block
 block discarded – undo
186 186
     }
187 187
     
188 188
     /**
189
-     * @return ArrayCollection
189
+     * @return IdentityWrapper
190 190
      */
191 191
     public function getEducationsIndexedById()
192 192
     {
@@ -215,7 +215,7 @@  discard block
 block discarded – undo
215 215
     }
216 216
     
217 217
     /**
218
-     * @return ArrayCollection
218
+     * @return IdentityWrapper
219 219
      */
220 220
     public function getEmploymentsIndexedById()
221 221
     {
@@ -244,7 +244,7 @@  discard block
 block discarded – undo
244 244
     }
245 245
     
246 246
     /**
247
-     * @return ArrayCollection
247
+     * @return IdentityWrapper
248 248
      */
249 249
     public function getSkillsIndexedById()
250 250
     {
@@ -322,7 +322,7 @@  discard block
 block discarded – undo
322 322
     }
323 323
 
324 324
     /**
325
-     * @return ArrayCollection
325
+     * @return IdentityWrapper
326 326
      */
327 327
     public function getLanguageSkillsIndexedById()
328 328
     {
@@ -360,7 +360,7 @@  discard block
 block discarded – undo
360 360
     }
361 361
     
362 362
     /**
363
-     * @param Status|string $status
363
+     * @param string $status
364 364
      */
365 365
     public function setStatus($status)
366 366
     {
@@ -407,6 +407,9 @@  discard block
 block discarded – undo
407 407
         }
408 408
     }
409 409
 
410
+    /**
411
+     * @param UserInterface $oldUser
412
+     */
410 413
     private function updatePermissions($oldUser = null)
411 414
     {
412 415
         $hasPermissions = (bool) $this->permissions;
Please login to merge, or discard this 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\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/Cv/src/Cv/Form/LanguageSkillFieldset.php 1 patch
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -11,9 +11,9 @@
 block discarded – undo
11 11
     public function init()
12 12
     {
13 13
         $this->setName('language')
14
-             ->setHydrator(new EntityHydrator())
15
-             ->setObject(new LanguageEntity())
16
-             ->setLabel('Language');
14
+                ->setHydrator(new EntityHydrator())
15
+                ->setObject(new LanguageEntity())
16
+                ->setLabel('Language');
17 17
         
18 18
         $this->add(
19 19
             array(
Please login to merge, or discard this patch.
module/Core/src/Core/Entity/LocationInterface.php 1 patch
Doc Comments   +7 added lines, -6 removed lines patch added patch discarded remove patch
@@ -20,14 +20,14 @@  discard block
 block discarded – undo
20 20
      * Sets the Postal Code of a location
21 21
      *
22 22
      * @param   string $postalCode
23
-     * @return mixed
23
+     * @return AbstractLocation
24 24
      */
25 25
     public function setPostalCode($postalCode);
26 26
 
27 27
     /**
28 28
      * Gets the Postal Code of a location
29 29
      *
30
-     * @return mixed
30
+     * @return string
31 31
      */
32 32
     public function getPostalCode();
33 33
 
@@ -44,6 +44,7 @@  discard block
 block discarded – undo
44 44
      *
45 45
      * @param GeoJson $coordinates
46 46
      * @internal param $point
47
+     * @return AbstractLocation
47 48
      */
48 49
     public function setCoordinates(GeoJson $coordinates);
49 50
 
@@ -51,7 +52,7 @@  discard block
 block discarded – undo
51 52
      * Sets the city name of a Location
52 53
      *
53 54
      * @param $city
54
-     * @return mixed
55
+     * @return AbstractLocation
55 56
      */
56 57
     public function setCity($city);
57 58
 
@@ -66,14 +67,14 @@  discard block
 block discarded – undo
66 67
      * Sets the country of a location
67 68
      *
68 69
      * @param $country
69
-     * @return mixed
70
+     * @return AbstractLocation
70 71
      */
71 72
     public function setCountry($country);
72 73
 
73 74
     /**
74 75
      * Gets the country of a location
75 76
      *
76
-     * @return mixed
77
+     * @return string
77 78
      */
78 79
     public function getCountry();
79 80
 
@@ -81,7 +82,7 @@  discard block
 block discarded – undo
81 82
      * Sets the region of a location. Eg. "Hessen" is a region in "Germany"
82 83
      *
83 84
      * @param $region
84
-     * @return mixed
85
+     * @return AbstractLocation
85 86
      */
86 87
     public function setRegion($region);
87 88
 
Please login to merge, or discard this patch.
module/Jobs/src/Jobs/Controller/ImportController.php 2 patches
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.
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -182,9 +182,9 @@  discard block
 block discarded – undo
182 182
                                 $location = new Location();
183 183
                                 $coords = array_map(function ($i) { return (float) $i; }, $locData['coordinates']);
184 184
                                 $location->setCountry($locData['country'])
185
-                                         ->setRegion($locData['region'])
186
-                                         ->setCity($locData['city'])
187
-                                         ->setCoordinates(new Point($coords));
185
+                                            ->setRegion($locData['region'])
186
+                                            ->setCity($locData['city'])
187
+                                            ->setCoordinates(new Point($coords));
188 188
 
189 189
                                 $jobLocations->add($location);
190 190
                             }
@@ -215,7 +215,7 @@  discard block
 block discarded – undo
215 215
                                 /* @var $jobEvents \Zend\EventManager\EventManager */
216 216
                                 $jobEvents = $services->get('Jobs/Events');
217 217
                                 $jobEvent->setName(JobEvent::EVENT_JOB_ACCEPTED)
218
-                                         ->setTarget($this);
218
+                                            ->setTarget($this);
219 219
                                 $responses = $jobEvents->trigger($jobEvent);
220 220
                                 foreach ($responses as $response) {
221 221
                                     // responses from the portals
Please login to merge, or discard this patch.
module/Cv/src/Cv/Entity/Status.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -47,7 +47,7 @@
 block discarded – undo
47 47
     public function __construct($status = self::NONPUBLIC)
48 48
     {
49 49
         if (!isset(static::$orderMap[$status])) {
50
-            throw new \DomainException('Unknown status: ' . $status);
50
+            throw new \DomainException('Unknown status: '.$status);
51 51
         }
52 52
         
53 53
         $this->name = $status;
Please login to merge, or discard this patch.
module/Cv/src/Cv/Entity/StatusInterface.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -16,9 +16,9 @@
 block discarded – undo
16 16
 interface StatusInterface extends EntityInterface
17 17
 {
18 18
 
19
-    const NONPUBLIC =  /*@translate*/ 'private';
19
+    const NONPUBLIC = /*@translate*/ 'private';
20 20
 
21
-    const PUBLIC_TO_ALL =  /*@translate*/ 'public to all';
21
+    const PUBLIC_TO_ALL = /*@translate*/ 'public to all';
22 22
 
23 23
     public function __construct($status = self::NONPUBLIC);
24 24
 
Please login to merge, or discard this patch.
module/Core/src/Core/Controller/Plugin/CreatePaginator.php 2 patches
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -90,16 +90,16 @@
 block discarded – undo
90 90
         /* @var \Zend\Paginator\Paginator $paginator */
91 91
         /* @var CreatePaginatorEvent $event */
92 92
         $events = $this->serviceManager->get('Core/CreatePaginator/Events');
93
-        $event = $events->getEvent(CreatePaginatorEvent::EVENT_CREATE_PAGINATOR,$this,[
93
+        $event = $events->getEvent(CreatePaginatorEvent::EVENT_CREATE_PAGINATOR, $this, [
94 94
             'paginatorParams' => $params,
95 95
             'paginators' => $paginators,
96 96
             'paginatorName' => $paginatorName
97 97
         ]);
98 98
         $events->trigger($event);
99 99
         $paginator = $event->getPaginator();
100
-        if(!$paginator instanceof Paginator){
100
+        if (!$paginator instanceof Paginator) {
101 101
             // no paginator created by listener, so let's create default paginator
102
-            $paginator = $paginators->get($paginatorName,$params);
102
+            $paginator = $paginators->get($paginatorName, $params);
103 103
         }
104 104
         $paginator->setCurrentPageNumber(isset($params['page']) ? $params['page'] : 1)
105 105
                   ->setItemCountPerPage(isset($params['count']) ? $params['count'] : 10)
Please login to merge, or discard this patch.
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -108,8 +108,8 @@
 block discarded – undo
108 108
             $paginator = $paginators->get($paginatorName,$params);
109 109
         }
110 110
         $paginator->setCurrentPageNumber(isset($params['page']) ? $params['page'] : 1)
111
-                  ->setItemCountPerPage(isset($params['count']) ? $params['count'] : 10)
112
-                  ->setPageRange(isset($params['range']) ? $params['range'] : 5);
111
+                    ->setItemCountPerPage(isset($params['count']) ? $params['count'] : 10)
112
+                    ->setPageRange(isset($params['range']) ? $params['range'] : 5);
113 113
 
114 114
         return $paginator;
115 115
     }
Please login to merge, or discard this patch.
module/Core/src/Core/Listener/Events/CreatePaginatorEvent.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -125,16 +125,16 @@
 block discarded – undo
125 125
 
126 126
     public function setParams($params)
127 127
     {
128
-        if(is_array($params)){
129
-            if(isset($params['paginatorParams'])){
128
+        if (is_array($params)) {
129
+            if (isset($params['paginatorParams'])) {
130 130
                 $this->setPaginatorParams($params['paginatorParams']);
131 131
                 unset($params['paginatorParams']);
132 132
             }
133
-            if(isset($params['paginators'])){
133
+            if (isset($params['paginators'])) {
134 134
                 $this->setPaginators($params['paginators']);
135 135
                 unset($params['paginators']);
136 136
             }
137
-            if(isset($params['paginatorName'])){
137
+            if (isset($params['paginatorName'])) {
138 138
                 $this->setPaginatorName($params['paginatorName']);
139 139
                 unset($params['paginatorName']);
140 140
             }
Please login to merge, or discard this patch.