@@ -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'); |
@@ -43,9 +43,9 @@ discard block |
||
43 | 43 | |
44 | 44 | public function __construct(RepositoryService $repositoryService, AuthenticationService $auth, Acl $acl) |
45 | 45 | { |
46 | - $this->repositoryService=$repositoryService; |
|
47 | - $this->auth=$auth; |
|
48 | - $this->acl=$acl; |
|
46 | + $this->repositoryService = $repositoryService; |
|
47 | + $this->auth = $auth; |
|
48 | + $this->acl = $acl; |
|
49 | 49 | } |
50 | 50 | |
51 | 51 | public function __invoke() |
@@ -64,12 +64,12 @@ discard block |
||
64 | 64 | public function get(Params $params, $allowDraft = false, $getSnapshot = false) |
65 | 65 | { |
66 | 66 | /* @var \Jobs\Repository\Job $jobRepository */ |
67 | - $jobRepository = $this->repositoryService->get('Jobs/Job'); |
|
67 | + $jobRepository = $this->repositoryService->get('Jobs/Job'); |
|
68 | 68 | $idFromRoute = $params('id', 0); |
69 | 69 | $idFromQuery = $params->fromQuery('id', 0); |
70 | 70 | $idFromSubForm = $params->fromPost('job', 0); |
71 | 71 | |
72 | - $id = empty($idFromRoute)? (empty($idFromQuery)?$idFromSubForm:$idFromQuery) : $idFromRoute; |
|
72 | + $id = empty($idFromRoute) ? (empty($idFromQuery) ? $idFromSubForm : $idFromQuery) : $idFromRoute; |
|
73 | 73 | $snapshotId = $params->fromPost('snapshot') ?: ($params->fromQuery('snapshot') ?: null); |
74 | 74 | |
75 | 75 | if (empty($id) && empty($snapshotId) && $allowDraft) { |
@@ -32,9 +32,9 @@ |
||
32 | 32 | $channel = $this->params()->fromRoute('channel', 'default'); |
33 | 33 | |
34 | 34 | /* @var Paginator $paginator */ |
35 | - $paginator = $this->paginator('Jobs/Job', ['channel' => $channel ]); |
|
35 | + $paginator = $this->paginator('Jobs/Job', ['channel' => $channel]); |
|
36 | 36 | |
37 | - $viewModel=new ViewModel(); |
|
37 | + $viewModel = new ViewModel(); |
|
38 | 38 | $viewModel->setVariables( |
39 | 39 | [ |
40 | 40 | 'jobs' => $paginator, |
@@ -54,9 +54,9 @@ discard block |
||
54 | 54 | } |
55 | 55 | |
56 | 56 | $date = new \DateTime('today'); |
57 | - $date->sub(new \DateInterval('P' . $days . 'D')); |
|
57 | + $date->sub(new \DateInterval('P'.$days.'D')); |
|
58 | 58 | |
59 | - $query = [ |
|
59 | + $query = [ |
|
60 | 60 | '$and' => [ |
61 | 61 | ['status.name' => StatusInterface::ACTIVE], |
62 | 62 | ['$or' => [ |
@@ -83,11 +83,11 @@ discard block |
||
83 | 83 | } |
84 | 84 | |
85 | 85 | if ($info) { |
86 | - echo count($jobs) , ' Jobs'; |
|
86 | + echo count($jobs), ' Jobs'; |
|
87 | 87 | if ($offset) { |
88 | - echo ' starting from ' . $offset; |
|
88 | + echo ' starting from '.$offset; |
|
89 | 89 | } |
90 | - echo PHP_EOL . PHP_EOL; |
|
90 | + echo PHP_EOL.PHP_EOL; |
|
91 | 91 | $this->listExpiredJobs($jobs); |
92 | 92 | return; |
93 | 93 | } |
@@ -98,7 +98,7 @@ discard block |
||
98 | 98 | // |
99 | 99 | echo "$count jobs found, which have to expire ...\n"; |
100 | 100 | |
101 | - $progress = new ProgressBar( |
|
101 | + $progress = new ProgressBar( |
|
102 | 102 | new ConsoleAdapter( |
103 | 103 | array( |
104 | 104 | 'elements' => array( |
@@ -121,7 +121,7 @@ discard block |
||
121 | 121 | |
122 | 122 | /* @var \Jobs\Entity\Job $job */ |
123 | 123 | foreach ($jobs as $job) { |
124 | - $progress->update($i++, 'Job ' . $i . ' / ' . $count); |
|
124 | + $progress->update($i++, 'Job '.$i.' / '.$count); |
|
125 | 125 | |
126 | 126 | $job->changeStatus('expired'); |
127 | 127 | |
@@ -149,7 +149,7 @@ discard block |
||
149 | 149 | $i = 0; |
150 | 150 | /* @var Job $job */ |
151 | 151 | foreach ($jobs as $job) { |
152 | - $progress->update($i++, 'Job ' . $i . ' / ' . $count); |
|
152 | + $progress->update($i++, 'Job '.$i.' / '.$count); |
|
153 | 153 | |
154 | 154 | $permissions = $job->getPermissions(); |
155 | 155 | $user = $job->getUser(); |
@@ -157,7 +157,7 @@ discard block |
||
157 | 157 | continue; |
158 | 158 | } |
159 | 159 | try { |
160 | - $group = $user->getGroup($job->getCompany()); |
|
160 | + $group = $user->getGroup($job->getCompany()); |
|
161 | 161 | } catch (\Exception $e) { |
162 | 162 | continue; |
163 | 163 | } |
@@ -196,7 +196,7 @@ discard block |
||
196 | 196 | $org = $job->getCompany(); |
197 | 197 | } |
198 | 198 | printf( |
199 | - '%s %s %s %-30s %-20s' . PHP_EOL, |
|
199 | + '%s %s %s %-30s %-20s'.PHP_EOL, |
|
200 | 200 | $id, |
201 | 201 | $job->getDatePublishStart()->format('Y-m-d'), |
202 | 202 | $job->getDatePublishEnd()->format('Y-m-d'), |
@@ -204,6 +204,6 @@ discard block |
||
204 | 204 | substr($org, 0, 20) |
205 | 205 | ); |
206 | 206 | } |
207 | - return count($jobs) . ' Jobs.'; |
|
207 | + return count($jobs).' Jobs.'; |
|
208 | 208 | } |
209 | 209 | } |
@@ -104,7 +104,7 @@ discard block |
||
104 | 104 | $this->auth()->isAdmin() |
105 | 105 | ) { |
106 | 106 | $applicationViewModel->setTemplate('iframe/iFrameInjection'); |
107 | - } elseif (Status::EXPIRED == $job->getStatus() or Status::INACTIVE == $job->getStatus()) { |
|
107 | + } elseif (Status::EXPIRED == $job->getStatus() or Status::INACTIVE == $job->getStatus()) { |
|
108 | 108 | $response->setStatusCode(Response::STATUS_CODE_410); |
109 | 109 | $model->setTemplate('jobs/error/expired'); |
110 | 110 | $model->setVariables( |
@@ -132,7 +132,7 @@ discard block |
||
132 | 132 | protected function editTemplateAction() |
133 | 133 | { |
134 | 134 | $id = $this->params('id'); |
135 | - $formIdentifier=$this->params()->fromQuery('form'); |
|
135 | + $formIdentifier = $this->params()->fromQuery('form'); |
|
136 | 136 | //$job = $this->jobRepository->find($id); |
137 | 137 | $job = $this->initializeJob()->get($this->params(), true, true); /* @var \Jobs\Entity\Job $job */ |
138 | 138 | $this->acl($job, 'edit'); |
@@ -164,7 +164,7 @@ discard block |
||
164 | 164 | |
165 | 165 | $instanceForm = $formTemplate->get($formIdentifier); |
166 | 166 | if (!isset($instanceForm)) { |
167 | - throw new \RuntimeException('No form found for "' . $formIdentifier . '"'); |
|
167 | + throw new \RuntimeException('No form found for "'.$formIdentifier.'"'); |
|
168 | 168 | } |
169 | 169 | |
170 | 170 | // the id is part of the postData, but it never should be altered |
@@ -23,7 +23,7 @@ discard block |
||
23 | 23 | * for multiple paths. |
24 | 24 | * example https://github.com/doctrine/DoctrineORMModule |
25 | 25 | */ |
26 | - 'paths' => [ __DIR__ . '/../src/Entity'], |
|
26 | + 'paths' => [__DIR__.'/../src/Entity'], |
|
27 | 27 | ], |
28 | 28 | ], |
29 | 29 | 'eventmanager' => [ |
@@ -44,7 +44,7 @@ discard block |
||
44 | 44 | 'translation_file_patterns' => [ |
45 | 45 | [ |
46 | 46 | 'type' => 'gettext', |
47 | - 'base_dir' => __DIR__ . '/../language', |
|
47 | + 'base_dir' => __DIR__.'/../language', |
|
48 | 48 | 'pattern' => '%s.mo', |
49 | 49 | ], |
50 | 50 | ], |
@@ -154,7 +154,7 @@ discard block |
||
154 | 154 | 'factories' => [ |
155 | 155 | \Cv\Controller\IndexController::class => \Zend\ServiceManager\Factory\InvokableFactory::class, |
156 | 156 | 'Cv/View' => 'Cv\Factory\Controller\ViewControllerFactory', |
157 | - 'Cv\Controller\Manage' => [ManageController::class,'factory'], |
|
157 | + 'Cv\Controller\Manage' => [ManageController::class, 'factory'], |
|
158 | 158 | ], |
159 | 159 | 'aliases' => [ |
160 | 160 | 'Cv/Index' => \Cv\Controller\IndexController::class, |
@@ -169,7 +169,7 @@ discard block |
||
169 | 169 | 'resume-recruiter' => [ |
170 | 170 | 'label' => /*@translate*/ 'Talent-Pool', |
171 | 171 | 'route' => 'lang/cvs', |
172 | - 'active_on' => [ 'lang/cvs/edit', 'lang/cvs/view' ], |
|
172 | + 'active_on' => ['lang/cvs/edit', 'lang/cvs/view'], |
|
173 | 173 | 'resource' => 'navigation/resume-recruiter', |
174 | 174 | 'order' => 10, |
175 | 175 | 'query' => [ |
@@ -200,15 +200,15 @@ discard block |
||
200 | 200 | |
201 | 201 | // Map template to files. Speeds up the lookup through the template stack. |
202 | 202 | 'template_map' => [ |
203 | - 'cv/form/employment.view' => __DIR__ . '/../view/cv/form/employment.view.phtml', |
|
204 | - 'cv/form/employment.form' => __DIR__ . '/../view/cv/form/employment.form.phtml', |
|
205 | - 'cv/form/education.view' => __DIR__ . '/../view/cv/form/education.view.phtml', |
|
206 | - 'cv/form/education.form' => __DIR__ . '/../view/cv/form/education.form.phtml' |
|
203 | + 'cv/form/employment.view' => __DIR__.'/../view/cv/form/employment.view.phtml', |
|
204 | + 'cv/form/employment.form' => __DIR__.'/../view/cv/form/employment.form.phtml', |
|
205 | + 'cv/form/education.view' => __DIR__.'/../view/cv/form/education.view.phtml', |
|
206 | + 'cv/form/education.form' => __DIR__.'/../view/cv/form/education.form.phtml' |
|
207 | 207 | ], |
208 | 208 | |
209 | 209 | // Where to look for view templates not mapped above |
210 | 210 | 'template_path_stack' => [ |
211 | - __DIR__ . '/../view', |
|
211 | + __DIR__.'/../view', |
|
212 | 212 | ], |
213 | 213 | ], |
214 | 214 |
@@ -44,8 +44,8 @@ |
||
44 | 44 | $fileId = new \MongoId($file->getId()); |
45 | 45 | $dm = $eventArgs->getDocumentManager(); |
46 | 46 | $dm->createQueryBuilder('Cv\Entity\Cv') |
47 | - ->update()->multiple(true) |
|
48 | - ->field('attachments')->equals($fileId)->pull($fileId) |
|
49 | - ->getQuery()->execute(); |
|
47 | + ->update()->multiple(true) |
|
48 | + ->field('attachments')->equals($fileId)->pull($fileId) |
|
49 | + ->getQuery()->execute(); |
|
50 | 50 | } |
51 | 51 | } |