@@ -240,7 +240,7 @@ discard block |
||
240 | 240 | /** |
241 | 241 | * Gets all comments for the application. |
242 | 242 | * |
243 | - * @return ArrayCollection; |
|
243 | + * @return Collection |
|
244 | 244 | |
245 | 245 | */ |
246 | 246 | public function getComments(); |
@@ -271,7 +271,7 @@ discard block |
||
271 | 271 | /** |
272 | 272 | * Gets all attributes for an application. |
273 | 273 | * |
274 | - * @return ArrayCollection; |
|
274 | + * @return Attributes |
|
275 | 275 | |
276 | 276 | */ |
277 | 277 | public function getAttributes(); |
@@ -241,7 +241,6 @@ discard block |
||
241 | 241 | * Gets all comments for the application. |
242 | 242 | * |
243 | 243 | * @return ArrayCollection; |
244 | - |
|
245 | 244 | */ |
246 | 245 | public function getComments(); |
247 | 246 | |
@@ -272,7 +271,6 @@ discard block |
||
272 | 271 | * Gets all attributes for an application. |
273 | 272 | * |
274 | 273 | * @return ArrayCollection; |
275 | - |
|
276 | 274 | */ |
277 | 275 | public function getAttributes(); |
278 | 276 |
@@ -18,7 +18,7 @@ |
||
18 | 18 | * returns the number of years of the education or work experience |
19 | 19 | * |
20 | 20 | * @param array $array |
21 | - * @return string |
|
21 | + * @return double |
|
22 | 22 | */ |
23 | 23 | public function __invoke($array) |
24 | 24 | { |
@@ -25,13 +25,13 @@ |
||
25 | 25 | // calculate EndDate - StartDate = X Years. |
26 | 26 | // eg. 4.2 Years |
27 | 27 | |
28 | - $days=0; |
|
28 | + $days = 0; |
|
29 | 29 | foreach ($array as $obj) { |
30 | 30 | $date1 = new \DateTime($obj->getEndDate()); |
31 | 31 | $date2 = new \DateTime($obj->getStartDate()); |
32 | 32 | $interval = $date1->diff($date2); |
33 | - $days+=abs($interval->format('%R%a')); |
|
33 | + $days += abs($interval->format('%R%a')); |
|
34 | 34 | } |
35 | - return round($days/365, 1); |
|
35 | + return round($days / 365, 1); |
|
36 | 36 | } |
37 | 37 | } |
@@ -165,7 +165,6 @@ discard block |
||
165 | 165 | * |
166 | 166 | * parameter are arbitrary elements for defaults or programming flow |
167 | 167 | * |
168 | - * @param array $parameter |
|
169 | 168 | * @return null|ViewModel |
170 | 169 | * @throws \RuntimeException |
171 | 170 | */ |
@@ -388,7 +387,7 @@ discard block |
||
388 | 387 | |
389 | 388 | /** |
390 | 389 | * @param $job \Jobs\Entity\Job |
391 | - * @return mixed |
|
390 | + * @return \Jobs\Form\Job |
|
392 | 391 | */ |
393 | 392 | protected function getFormular($job) |
394 | 393 | { |
@@ -411,7 +410,7 @@ discard block |
||
411 | 410 | } |
412 | 411 | |
413 | 412 | /** |
414 | - * @param $form |
|
413 | + * @param \Jobs\Form\Job $form |
|
415 | 414 | * @param array $params |
416 | 415 | * @return ViewModel |
417 | 416 | */ |
@@ -604,7 +603,7 @@ discard block |
||
604 | 603 | } |
605 | 604 | |
606 | 605 | /** |
607 | - * @param $script |
|
606 | + * @param string $script |
|
608 | 607 | * @param array $parameter |
609 | 608 | * @return ViewModel |
610 | 609 | */ |
@@ -178,7 +178,7 @@ discard block |
||
178 | 178 | if (empty($user->getInfo()->getEmail())) { |
179 | 179 | return $this->getErrorViewModel('no-parent', array('cause' => 'noEmail')); |
180 | 180 | } |
181 | - $userOrg = $user->getOrganization(); |
|
181 | + $userOrg = $user->getOrganization(); |
|
182 | 182 | if (!$userOrg->hasAssociation() || $userOrg->getOrganization()->isDraft()) { |
183 | 183 | return $this->getErrorViewModel('no-parent', array('cause' => 'noCompany')); |
184 | 184 | } |
@@ -208,7 +208,7 @@ discard block |
||
208 | 208 | } |
209 | 209 | |
210 | 210 | |
211 | - $viewModel = null; |
|
211 | + $viewModel = null; |
|
212 | 212 | $this->acl($jobEntity, 'edit'); |
213 | 213 | if ($status = $params->fromQuery('status')) { |
214 | 214 | $this->changeStatus($jobEntity, $status); |
@@ -220,11 +220,11 @@ discard block |
||
220 | 220 | $instanceForm = null; |
221 | 221 | $formErrorMessages = array(); |
222 | 222 | |
223 | - if (isset($formIdentifier) && $request->isPost()) { |
|
223 | + if (isset($formIdentifier) && $request->isPost()) { |
|
224 | 224 | // at this point the form get instantiated and immediately accumulated |
225 | 225 | $instanceForm = $form->getForm($formIdentifier); |
226 | 226 | if (!isset($instanceForm)) { |
227 | - throw new \RuntimeException('No form found for "' . $formIdentifier . '"'); |
|
227 | + throw new \RuntimeException('No form found for "'.$formIdentifier.'"'); |
|
228 | 228 | } |
229 | 229 | // the id may be part of the postData, but it never should be altered |
230 | 230 | $postData = $request->getPost(); |
@@ -278,20 +278,20 @@ discard block |
||
278 | 278 | $jobValid = false; |
279 | 279 | $errorMessage[] = $this->translator->translate('Accept the Terms'); |
280 | 280 | } |
281 | - $result = $formEvents->trigger('ValidateJob', $this, [ 'form' => $form ]); |
|
281 | + $result = $formEvents->trigger('ValidateJob', $this, ['form' => $form]); |
|
282 | 282 | foreach ($result as $messages) { |
283 | 283 | if (!$messages) { |
284 | 284 | continue; |
285 | 285 | } |
286 | 286 | if (!is_array($messages)) { |
287 | - $messages = [ $messages ]; |
|
287 | + $messages = [$messages]; |
|
288 | 288 | } |
289 | 289 | |
290 | 290 | $errorMessage = array_merge($errorMessage, $messages); |
291 | 291 | $jobValid = false; |
292 | 292 | } |
293 | 293 | |
294 | - $errorMessage = '<br />' . implode('<br />', $errorMessage); |
|
294 | + $errorMessage = '<br />'.implode('<br />', $errorMessage); |
|
295 | 295 | if ($isAjax) { |
296 | 296 | if ($instanceForm instanceof SummaryForm) { |
297 | 297 | $instanceForm->setRenderMode(SummaryForm::RENDER_SUMMARY); |
@@ -299,7 +299,7 @@ discard block |
||
299 | 299 | } else { |
300 | 300 | $viewHelper = 'form'; |
301 | 301 | } |
302 | - $viewHelperManager = $serviceLocator->get('ViewHelperManager'); |
|
302 | + $viewHelperManager = $serviceLocator->get('ViewHelperManager'); |
|
303 | 303 | $content = $viewHelperManager->get($viewHelper)->__invoke($instanceForm); |
304 | 304 | $viewModel = new JsonModel( |
305 | 305 | array( |
@@ -322,7 +322,7 @@ discard block |
||
322 | 322 | } |
323 | 323 | } |
324 | 324 | } else { |
325 | - $formEvents->trigger('DisableElements', $this, [ 'form' => $form, 'job'=>$jobEntity ]); |
|
325 | + $formEvents->trigger('DisableElements', $this, ['form' => $form, 'job'=>$jobEntity]); |
|
326 | 326 | // Job is deployed, some changes are now disabled |
327 | 327 | $form->enableAll(); |
328 | 328 | } |
@@ -330,7 +330,7 @@ discard block |
||
330 | 330 | |
331 | 331 | $completionLink = $this->url()->fromRoute( |
332 | 332 | 'lang/jobs/completion', |
333 | - [ 'id' => $jobEntity->getId()] |
|
333 | + ['id' => $jobEntity->getId()] |
|
334 | 334 | ); |
335 | 335 | |
336 | 336 | $viewModel = $this->getViewModel($form); |
@@ -501,7 +501,7 @@ discard block |
||
501 | 501 | // array with differences between the last snapshot and the actual entity |
502 | 502 | // is remains Null if there is no snapshot |
503 | 503 | // it will be an empty array if the snapshot and the actual entity do not differ |
504 | - $diff = null; |
|
504 | + $diff = null; |
|
505 | 505 | |
506 | 506 | |
507 | 507 | if ($params == 'declined') { |
@@ -560,7 +560,7 @@ discard block |
||
560 | 560 | */ |
561 | 561 | public function deactivateAction() |
562 | 562 | { |
563 | - $user = $this->auth->getUser(); |
|
563 | + $user = $this->auth->getUser(); |
|
564 | 564 | |
565 | 565 | $jobEntity = $this->initializeJob()->get($this->params()); |
566 | 566 |
@@ -23,7 +23,7 @@ discard block |
||
23 | 23 | $entity = $value; |
24 | 24 | $value = array(); |
25 | 25 | foreach ($entity->getSearchableProperties() as $name) { |
26 | - $result = $entity->{'get' .$name}(); |
|
26 | + $result = $entity->{'get'.$name}(); |
|
27 | 27 | if (is_array($result)) { |
28 | 28 | $value = array_merge($value, $result); |
29 | 29 | } else { |
@@ -48,8 +48,8 @@ discard block |
||
48 | 48 | $innerPattern = StringUtils::hasPcreUnicodeSupport() |
49 | 49 | ? '[^\p{L}]' |
50 | 50 | : '[^a-z0-9ßäöü ]'; |
51 | - $pattern = '~' . $innerPattern . '~isu'; |
|
52 | - $stripPattern = '~^' . $innerPattern . '+|' . $innerPattern . '+$~isu'; |
|
51 | + $pattern = '~'.$innerPattern.'~isu'; |
|
52 | + $stripPattern = '~^'.$innerPattern.'+|'.$innerPattern.'+$~isu'; |
|
53 | 53 | $parts = array(); |
54 | 54 | $textParts = explode(' ', $string); |
55 | 55 | foreach ($textParts as $part) { |
@@ -144,7 +144,7 @@ discard block |
||
144 | 144 | |
145 | 145 | public function prepareElement(FormInterface $form) |
146 | 146 | { |
147 | - $form->setAttribute('class', ($this->isMultiple() ? 'multi' : 'single') . '-file-upload'); |
|
147 | + $form->setAttribute('class', ($this->isMultiple() ? 'multi' : 'single').'-file-upload'); |
|
148 | 148 | $form->setAttribute('data-is-empty', null === $this->getValue()); |
149 | 149 | parent::prepareElement($form); |
150 | 150 | } |
@@ -247,7 +247,7 @@ discard block |
||
247 | 247 | $entityName = $this->getName(); |
248 | 248 | |
249 | 249 | try { |
250 | - $fileEntity = $object->{"get" . $entityName}(); |
|
250 | + $fileEntity = $object->{"get".$entityName}(); |
|
251 | 251 | } catch (\OutOfBoundsException $e) { |
252 | 252 | return null; |
253 | 253 | } |
@@ -49,11 +49,11 @@ |
||
49 | 49 | $properties = $refl->getProperties(); |
50 | 50 | |
51 | 51 | foreach ($properties as $property) { |
52 | - $name = $property->getName(); |
|
52 | + $name = $property->getName(); |
|
53 | 53 | if ('_' == $name{0}) { |
54 | 54 | continue; |
55 | 55 | } |
56 | - $value = $rating->{'get' . $name}(); |
|
56 | + $value = $rating->{'get'.$name}(); |
|
57 | 57 | $input = array( |
58 | 58 | 'type' => 'Core/Rating', |
59 | 59 | 'name' => $name, |
@@ -18,7 +18,7 @@ |
||
18 | 18 | { |
19 | 19 | /* @var \Jobs\Entity\Job $value */ |
20 | 20 | $result = null; |
21 | - if (method_exists($value,'getTemplateValues')) { |
|
21 | + if (method_exists($value, 'getTemplateValues')) { |
|
22 | 22 | $result = $value->getTemplateValues()->getQualifications(); |
23 | 23 | } |
24 | 24 | return $result; |
@@ -17,7 +17,7 @@ |
||
17 | 17 | public function extract($value) |
18 | 18 | { |
19 | 19 | $result = null; |
20 | - if (method_exists($value,'templateValues')) { |
|
20 | + if (method_exists($value, 'templateValues')) { |
|
21 | 21 | $result = $value->getTemplateValues()->getTitle(); |
22 | 22 | } |
23 | 23 | return $result; |
@@ -460,10 +460,10 @@ discard block |
||
460 | 460 | public function getLocation() |
461 | 461 | { |
462 | 462 | if (null === $this->location) { |
463 | - $array=[]; |
|
464 | - if(null != $this->locations){ |
|
463 | + $array = []; |
|
464 | + if (null != $this->locations) { |
|
465 | 465 | foreach ($this->locations as $location) { /* @var \Core\Entity\LocationInterface $location */ |
466 | - $array[]=$location->getCity(); |
|
466 | + $array[] = $location->getCity(); |
|
467 | 467 | } |
468 | 468 | return implode(', ', $array); |
469 | 469 | } |
@@ -518,7 +518,7 @@ discard block |
||
518 | 518 | if ($removePermissions) { |
519 | 519 | $this->getPermissions()->revoke($this->user, Permissions::PERMISSION_ALL); |
520 | 520 | } |
521 | - $this->user=null; |
|
521 | + $this->user = null; |
|
522 | 522 | } |
523 | 523 | |
524 | 524 | return $this; |
@@ -768,7 +768,7 @@ discard block |
||
768 | 768 | $organization = $this->organization; |
769 | 769 | if (is_object($organization) && $organization->getImage()) { |
770 | 770 | $organizationImage = $organization->getImage(); |
771 | - return "/file/Organizations.OrganizationImage/" . $organizationImage->getId(); |
|
771 | + return "/file/Organizations.OrganizationImage/".$organizationImage->getId(); |
|
772 | 772 | } |
773 | 773 | return $this->logoRef; |
774 | 774 | } |