@@ -36,7 +36,7 @@ discard block |
||
36 | 36 | * @var String |
37 | 37 | * @ODM\Field(type="string") |
38 | 38 | */ |
39 | - protected $qualifications=''; |
|
39 | + protected $qualifications = ''; |
|
40 | 40 | |
41 | 41 | /** |
42 | 42 | * Requirements field of the job template |
@@ -44,7 +44,7 @@ discard block |
||
44 | 44 | * @var String |
45 | 45 | * @ODM\Field(type="string") |
46 | 46 | */ |
47 | - protected $requirements=''; |
|
47 | + protected $requirements = ''; |
|
48 | 48 | |
49 | 49 | /** |
50 | 50 | * Benefits field of the job template |
@@ -52,7 +52,7 @@ discard block |
||
52 | 52 | * @var String |
53 | 53 | * @ODM\Field(type="string") |
54 | 54 | */ |
55 | - protected $benefits=''; |
|
55 | + protected $benefits = ''; |
|
56 | 56 | |
57 | 57 | /** |
58 | 58 | * Job title field of the job template |
@@ -60,7 +60,7 @@ discard block |
||
60 | 60 | * @var String |
61 | 61 | * @ODM\Field(type="string") |
62 | 62 | */ |
63 | - protected $title=''; |
|
63 | + protected $title = ''; |
|
64 | 64 | |
65 | 65 | /** |
66 | 66 | * Company description field of the job template |
@@ -68,7 +68,7 @@ discard block |
||
68 | 68 | * @var String |
69 | 69 | * @ODM\Field(type="string") |
70 | 70 | */ |
71 | - protected $description=''; |
|
71 | + protected $description = ''; |
|
72 | 72 | |
73 | 73 | /** |
74 | 74 | * language of the job template values. Must be a valid ISO 639-1 code |
@@ -76,7 +76,7 @@ discard block |
||
76 | 76 | * @var String |
77 | 77 | * @ODM\Field(type="string") |
78 | 78 | */ |
79 | - protected $language='en'; |
|
79 | + protected $language = 'en'; |
|
80 | 80 | |
81 | 81 | /** |
82 | 82 | * Pure HTML |
@@ -85,7 +85,7 @@ discard block |
||
85 | 85 | * @var string |
86 | 86 | * @since 0.29 |
87 | 87 | */ |
88 | - protected $html=''; |
|
88 | + protected $html = ''; |
|
89 | 89 | |
90 | 90 | /** |
91 | 91 | * free values (currently not in use) |
@@ -102,7 +102,7 @@ discard block |
||
102 | 102 | */ |
103 | 103 | public function setQualifications($qualifications) |
104 | 104 | { |
105 | - $this->qualifications= (string) $qualifications; |
|
105 | + $this->qualifications = (string) $qualifications; |
|
106 | 106 | return $this; |
107 | 107 | } |
108 | 108 | |
@@ -124,7 +124,7 @@ discard block |
||
124 | 124 | */ |
125 | 125 | public function setRequirements($requirements) |
126 | 126 | { |
127 | - $this->requirements=(string) $requirements; |
|
127 | + $this->requirements = (string) $requirements; |
|
128 | 128 | return $this; |
129 | 129 | } |
130 | 130 | |
@@ -146,7 +146,7 @@ discard block |
||
146 | 146 | */ |
147 | 147 | public function setBenefits($benefits) |
148 | 148 | { |
149 | - $this->benefits=(string) $benefits; |
|
149 | + $this->benefits = (string) $benefits; |
|
150 | 150 | return $this; |
151 | 151 | } |
152 | 152 | |
@@ -168,7 +168,7 @@ discard block |
||
168 | 168 | */ |
169 | 169 | public function setTitle($title) |
170 | 170 | { |
171 | - $this->title=(string) $title; |
|
171 | + $this->title = (string) $title; |
|
172 | 172 | return $this; |
173 | 173 | } |
174 | 174 | |
@@ -190,7 +190,7 @@ discard block |
||
190 | 190 | */ |
191 | 191 | public function setDescription($description) |
192 | 192 | { |
193 | - $this->description=(string) $description; |
|
193 | + $this->description = (string) $description; |
|
194 | 194 | return $this; |
195 | 195 | } |
196 | 196 | |
@@ -212,7 +212,7 @@ discard block |
||
212 | 212 | */ |
213 | 213 | public function setLanguage($language) |
214 | 214 | { |
215 | - $this->language=(string) $language; |
|
215 | + $this->language = (string) $language; |
|
216 | 216 | return $this; |
217 | 217 | } |
218 | 218 | |
@@ -281,7 +281,7 @@ discard block |
||
281 | 281 | |
282 | 282 | public function __get($property) |
283 | 283 | { |
284 | - $getter = "get" . ucfirst($property); |
|
284 | + $getter = "get".ucfirst($property); |
|
285 | 285 | if (method_exists($this, $getter)) { |
286 | 286 | return $this->$getter(); |
287 | 287 | } |
@@ -296,7 +296,7 @@ discard block |
||
296 | 296 | public function __set($property, $value) |
297 | 297 | { |
298 | 298 | //$this->checkWriteAccess(); |
299 | - $setter = 'set' . ucfirst($property); |
|
299 | + $setter = 'set'.ucfirst($property); |
|
300 | 300 | if (method_exists($this, $setter)) { |
301 | 301 | $this->$setter($value); |
302 | 302 | return; |
@@ -59,12 +59,12 @@ discard block |
||
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 |
||
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 | /** |
@@ -245,6 +245,6 @@ |
||
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 | } |
@@ -65,8 +65,8 @@ |
||
65 | 65 | 'link' => $this->jobUrl->__invoke( |
66 | 66 | $job, |
67 | 67 | [ |
68 | - 'linkOnly'=> true, |
|
69 | - 'absolute' => true, |
|
68 | + 'linkOnly'=> true, |
|
69 | + 'absolute' => true, |
|
70 | 70 | ] |
71 | 71 | ), |
72 | 72 | 'organization' => array( |
@@ -71,7 +71,7 @@ |
||
71 | 71 | return new JsonModel([ |
72 | 72 | 'valid' => $valid, |
73 | 73 | 'errors' => $errors |
74 | - ]); |
|
74 | + ]); |
|
75 | 75 | } |
76 | 76 | |
77 | 77 | $form->bind($job); |
@@ -57,9 +57,9 @@ discard block |
||
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 |
||
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 |
||
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 | } |
@@ -67,7 +67,7 @@ discard block |
||
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 |
||
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([ |
@@ -41,7 +41,7 @@ |
||
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 |
@@ -192,9 +192,9 @@ |
||
192 | 192 | return (float) $i; |
193 | 193 | }, $locData['coordinates']); |
194 | 194 | $location->setCountry($locData['country']) |
195 | - ->setRegion($locData['region']) |
|
196 | - ->setCity($locData['city']) |
|
197 | - ->setCoordinates(new Point($coords)); |
|
195 | + ->setRegion($locData['region']) |
|
196 | + ->setCity($locData['city']) |
|
197 | + ->setCoordinates(new Point($coords)); |
|
198 | 198 | |
199 | 199 | $jobLocations->add($location); |
200 | 200 | } |
@@ -84,7 +84,7 @@ discard block |
||
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 |
||
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 |
||
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 |
||
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 |
||
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); |
@@ -62,7 +62,7 @@ |
||
62 | 62 | $job = $this->repository->find($id); |
63 | 63 | |
64 | 64 | if (!$job) { |
65 | - throw new \RuntimeException('No job found with id "' . $id . '"'); |
|
65 | + throw new \RuntimeException('No job found with id "'.$id.'"'); |
|
66 | 66 | } |
67 | 67 | |
68 | 68 | $this->acl($job, 'edit'); |