@@ -78,7 +78,7 @@ |
||
78 | 78 | /** |
79 | 79 | * @see AttachableEntityInterface::createAttachedEntity() |
80 | 80 | */ |
81 | - public function createAttachedEntity($entityClass, $values = [], $key=null) |
|
81 | + public function createAttachedEntity($entityClass, $values = [], $key = null) |
|
82 | 82 | { |
83 | 83 | return $this->getAttachableEntityManager()->createAttachedEntity($entityClass, $values, $key); |
84 | 84 | } |
@@ -89,7 +89,7 @@ discard block |
||
89 | 89 | |
90 | 90 | private function fromEvent($name, $values) |
91 | 91 | { |
92 | - $event = $this->events->getEvent($name, $this, $values); |
|
92 | + $event = $this->events->getEvent($name, $this, $values); |
|
93 | 93 | $results = $this->events->triggerEvent($event); |
94 | 94 | |
95 | 95 | $snippets = []; |
@@ -138,7 +138,7 @@ discard block |
||
138 | 138 | $content = $item['content']; |
139 | 139 | |
140 | 140 | foreach ($values as $key => $val) { |
141 | - $content = str_replace('%' . $key . '%', $val, $content); |
|
141 | + $content = str_replace('%'.$key.'%', $val, $content); |
|
142 | 142 | } |
143 | 143 | |
144 | 144 | return $content; |
@@ -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 | } |
@@ -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; |
@@ -58,7 +58,7 @@ discard block |
||
58 | 58 | public function viewAction() |
59 | 59 | { |
60 | 60 | $id = $this->params()->fromQuery('id'); |
61 | - $channel = $this->params()->fromRoute('channel','default'); |
|
61 | + $channel = $this->params()->fromRoute('channel', 'default'); |
|
62 | 62 | $response = $this->getResponse(); |
63 | 63 | /* @var \Jobs\Entity\Job $job */ |
64 | 64 | try { |
@@ -87,7 +87,7 @@ discard block |
||
87 | 87 | $this->auth()->isAdmin() |
88 | 88 | ) { |
89 | 89 | $applicationViewModel->setTemplate('iframe/iFrameInjection'); |
90 | - }elseif(Status::EXPIRED == $job->getStatus() or Status::INACTIVE == $job->getStatus()) { |
|
90 | + }elseif (Status::EXPIRED == $job->getStatus() or Status::INACTIVE == $job->getStatus()) { |
|
91 | 91 | $response->setStatusCode(Response::STATUS_CODE_410); |
92 | 92 | $model->setTemplate('jobs/error/expired'); |
93 | 93 | $model->setVariables( |
@@ -115,7 +115,7 @@ discard block |
||
115 | 115 | protected function editTemplateAction() |
116 | 116 | { |
117 | 117 | $id = $this->params('id'); |
118 | - $formIdentifier=$this->params()->fromQuery('form'); |
|
118 | + $formIdentifier = $this->params()->fromQuery('form'); |
|
119 | 119 | //$job = $this->jobRepository->find($id); |
120 | 120 | $job = $this->initializeJob()->get($this->params(), true, true); /* @var \Jobs\Entity\Job $job */ |
121 | 121 | $this->acl($job, 'edit'); |
@@ -139,7 +139,7 @@ discard block |
||
139 | 139 | |
140 | 140 | $formTemplate->setParam('id', $job->getId()); |
141 | 141 | $formTemplate->setParam('applyId', $job->getApplyId()); |
142 | - $formTemplate->setParam('snapshot', $job instanceOf JobSnapshot ? $job->getSnapshotId() : '' ); |
|
142 | + $formTemplate->setParam('snapshot', $job instanceOf JobSnapshot ? $job->getSnapshotId() : ''); |
|
143 | 143 | |
144 | 144 | $formTemplate->setEntity($job); |
145 | 145 | |
@@ -148,7 +148,7 @@ discard block |
||
148 | 148 | |
149 | 149 | $instanceForm = $formTemplate->get($formIdentifier); |
150 | 150 | if (!isset($instanceForm)) { |
151 | - throw new \RuntimeException('No form found for "' . $formIdentifier . '"'); |
|
151 | + throw new \RuntimeException('No form found for "'.$formIdentifier.'"'); |
|
152 | 152 | } |
153 | 153 | |
154 | 154 | // the id is part of the postData, but it never should be altered |
@@ -131,8 +131,8 @@ |
||
131 | 131 | */ |
132 | 132 | public function loadUnreadApplicationsForJob($job) |
133 | 133 | { |
134 | - $auth=$this->getService('AuthenticationService'); |
|
135 | - $qb=$this->createQueryBuilder() |
|
134 | + $auth = $this->getService('AuthenticationService'); |
|
135 | + $qb = $this->createQueryBuilder() |
|
136 | 136 | ->field("readBy")->notIn(array($auth->getUser()->getId())) |
137 | 137 | ->field("job")->equals(new \MongoId($job->getId())); |
138 | 138 | return $qb->getQuery()->execute(); |