@@ -63,10 +63,10 @@ |
||
63 | 63 | $image = $org->getImage(); |
64 | 64 | $imageUrl = $image ? $image->getUri() : ''; |
65 | 65 | |
66 | - $options[$org->getId()] = $name . '|' |
|
67 | - . $contact->getCity() . '|' |
|
68 | - . $contact->getStreet() . '|' |
|
69 | - . $contact->getHouseNumber() . '|' |
|
66 | + $options[$org->getId()] = $name.'|' |
|
67 | + . $contact->getCity().'|' |
|
68 | + . $contact->getStreet().'|' |
|
69 | + . $contact->getHouseNumber().'|' |
|
70 | 70 | . $imageUrl; |
71 | 71 | } |
72 | 72 |
@@ -35,7 +35,7 @@ |
||
35 | 35 | |
36 | 36 | public function render(ElementInterface $element, $options = null) |
37 | 37 | { |
38 | - $content = '<iframe src="' . $element->getValue() . '" name="preview" style="width:100%; height:800px;"></iframe>'; |
|
38 | + $content = '<iframe src="'.$element->getValue().'" name="preview" style="width:100%; height:800px;"></iframe>'; |
|
39 | 39 | return $content; |
40 | 40 | } |
41 | 41 | } |
@@ -56,7 +56,7 @@ discard block |
||
56 | 56 | { |
57 | 57 | return $this->findBy( |
58 | 58 | array( |
59 | - 'permissions.assigned.' . $resourceId => array( |
|
59 | + 'permissions.assigned.'.$resourceId => array( |
|
60 | 60 | '$exists' => true |
61 | 61 | ) |
62 | 62 | ) |
@@ -77,7 +77,7 @@ discard block |
||
77 | 77 | $qb->hydrate(false) |
78 | 78 | ->select('title', 'applyId') |
79 | 79 | ->field('permissions.view')->equals($userId) |
80 | - ->field('title')->equals(new \MongoRegex('/' . $query . '/i')) |
|
80 | + ->field('title')->equals(new \MongoRegex('/'.$query.'/i')) |
|
81 | 81 | ->sort('title') |
82 | 82 | ->limit(5); |
83 | 83 | |
@@ -144,7 +144,7 @@ discard block |
||
144 | 144 | $qb = $this->createQueryBuilder(); |
145 | 145 | $qb->distinct('organization') |
146 | 146 | ->hydrate(true) |
147 | - ->field('status.name')->notIn([ StatusInterface::EXPIRED, StatusInterface::INACTIVE ]); |
|
147 | + ->field('status.name')->notIn([StatusInterface::EXPIRED, StatusInterface::INACTIVE]); |
|
148 | 148 | $q = $qb->getQuery(); |
149 | 149 | $r = $q->execute(); |
150 | 150 | $r = $r->toArray(); |
@@ -123,7 +123,7 @@ discard block |
||
123 | 123 | if (!isset($this->job)) { |
124 | 124 | throw new \InvalidArgumentException('cannot create a viewModel for Templates without an $job'); |
125 | 125 | } |
126 | - $model->setTemplate('templates/' . $this->job->getTemplate() . '/index'); |
|
126 | + $model->setTemplate('templates/'.$this->job->getTemplate().'/index'); |
|
127 | 127 | return $model; |
128 | 128 | } |
129 | 129 | |
@@ -171,7 +171,7 @@ discard block |
||
171 | 171 | throw new \InvalidArgumentException('cannot create a viewModel for Templates without aa $job'); |
172 | 172 | } |
173 | 173 | $location = $this->job->getLocation(); |
174 | - $this->container['location'] = isset($location)?$location:''; |
|
174 | + $this->container['location'] = isset($location) ? $location : ''; |
|
175 | 175 | return $this; |
176 | 176 | } |
177 | 177 | |
@@ -192,7 +192,7 @@ discard block |
||
192 | 192 | } |
193 | 193 | $description = $this->job->templateValues->description; |
194 | 194 | |
195 | - $this->container['description'] = isset($description)?$description:''; |
|
195 | + $this->container['description'] = isset($description) ? $description : ''; |
|
196 | 196 | return $this; |
197 | 197 | } |
198 | 198 | |
@@ -256,9 +256,9 @@ discard block |
||
256 | 256 | if (!isset($this->job)) { |
257 | 257 | throw new \InvalidArgumentException('cannot create a viewModel for Templates without a $job'); |
258 | 258 | } |
259 | - $labelQualifications=''; |
|
260 | - $labelBenefits=''; |
|
261 | - $labelRequirements=''; |
|
259 | + $labelQualifications = ''; |
|
260 | + $labelBenefits = ''; |
|
261 | + $labelRequirements = ''; |
|
262 | 262 | |
263 | 263 | $organization = $this->job->organization; |
264 | 264 | if (isset($organization)) { |
@@ -171,14 +171,14 @@ |
||
171 | 171 | $jsonLastError = json_last_error(); |
172 | 172 | if (json_last_error() != JSON_ERROR_NONE) { |
173 | 173 | // not able to decode json |
174 | - $log->info('RestCall Response not Json [errorCode: ' . $jsonLastError . ']: ' . var_export($body, true)); |
|
174 | + $log->info('RestCall Response not Json [errorCode: '.$jsonLastError.']: '.var_export($body, true)); |
|
175 | 175 | } else { |
176 | 176 | // does the provider want to have an own ID for Identification ? |
177 | 177 | $response_referenceUpdate = $decodedBody->referenceUpdate; |
178 | 178 | $response_externalIdUpdate = $decodedBody->applyIdUpdate; |
179 | 179 | |
180 | 180 | if ($publisher->externalId != $response_externalIdUpdate || $publisher->reference != $response_referenceUpdate) { |
181 | - $log->info('RestCall changed externalID [' . var_export($publisher->externalId, true) . ' => ' . var_export($response_externalIdUpdate, true) . '], reference [' . var_export($publisher->reference, true) . ' => ' . var_export($response_referenceUpdate, true) . ']'); |
|
181 | + $log->info('RestCall changed externalID ['.var_export($publisher->externalId, true).' => '.var_export($response_externalIdUpdate, true).'], reference ['.var_export($publisher->reference, true).' => '.var_export($response_referenceUpdate, true).']'); |
|
182 | 182 | $publisher->reference = $response_referenceUpdate; |
183 | 183 | $publisher->externalId = $response_externalIdUpdate; |
184 | 184 | $serviceManager->get('repositories')->store($entity); |
@@ -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'); |
@@ -39,10 +39,10 @@ discard block |
||
39 | 39 | |
40 | 40 | case "days": |
41 | 41 | $date = new \DateTime(); |
42 | - $date->modify('-' . (int) $value. ' day'); |
|
42 | + $date->modify('-'.(int) $value.' day'); |
|
43 | 43 | $q = array('$lt' => $date); |
44 | 44 | if (isset($query['datePublishStart.date'])) { |
45 | - $query['datePublishStart.date']= array_merge( |
|
45 | + $query['datePublishStart.date'] = array_merge( |
|
46 | 46 | $query['datePublishStart.date'], |
47 | 47 | $q |
48 | 48 | ); |
@@ -72,7 +72,7 @@ discard block |
||
72 | 72 | |
73 | 73 | echo "$count jobs found, which have to expire ...\n"; |
74 | 74 | |
75 | - $progress = new ProgressBar( |
|
75 | + $progress = new ProgressBar( |
|
76 | 76 | new ConsoleAdapter( |
77 | 77 | array( |
78 | 78 | 'elements' => array( |
@@ -95,7 +95,7 @@ discard block |
||
95 | 95 | |
96 | 96 | /* @var \Jobs\Entity\Job $job */ |
97 | 97 | foreach ($jobs as $job) { |
98 | - $progress->update($i++, 'Job ' . $i . ' / ' . $count); |
|
98 | + $progress->update($i++, 'Job '.$i.' / '.$count); |
|
99 | 99 | |
100 | 100 | $job->changeStatus('expired'); |
101 | 101 | |
@@ -124,7 +124,7 @@ discard block |
||
124 | 124 | $i = 0; |
125 | 125 | /* @var Job $job */ |
126 | 126 | foreach ($jobs as $job) { |
127 | - $progress->update($i++, 'Job ' . $i . ' / ' . $count); |
|
127 | + $progress->update($i++, 'Job '.$i.' / '.$count); |
|
128 | 128 | |
129 | 129 | $permissions = $job->getPermissions(); |
130 | 130 | $user = $job->getUser(); |
@@ -132,7 +132,7 @@ discard block |
||
132 | 132 | continue; |
133 | 133 | } |
134 | 134 | try { |
135 | - $group = $user->getGroup($job->getCompany()); |
|
135 | + $group = $user->getGroup($job->getCompany()); |
|
136 | 136 | } catch (\Exception $e) { |
137 | 137 | continue; |
138 | 138 | } |
@@ -71,7 +71,7 @@ discard block |
||
71 | 71 | 'atsEnabled' => '1', |
72 | 72 | 'uriApply' => 'http://mw2.yawik.org/de/apply/129145', |
73 | 73 | 'logoRef' => 'http://anzeigen.jobsintown.de/companies/logo/image-id/3263', |
74 | - 'publisher' => 'http://anzeigen.jobsintown.de/feedbackJobPublish/' . '2130010128', |
|
74 | + 'publisher' => 'http://anzeigen.jobsintown.de/feedbackJobPublish/'.'2130010128', |
|
75 | 75 | 'imageUrl' => 'http://th07.deviantart.net/fs71/PRE/i/2014/230/5/8/a_battle_with_the_elements_by_lordljcornellphotos-d7vns0p.jpg', |
76 | 76 | 'locations' => '[{"country":"Deutschland","city":null,"region":"Mecklenburg-Vorpommern","coordinates":["13.2555","53.5476"]}]', |
77 | 77 | |
@@ -105,7 +105,7 @@ discard block |
||
105 | 105 | $entity = $repositoriesJob->findOneBy(array("applyId" => (string) $applyId)); |
106 | 106 | if (!isset($entity)) { |
107 | 107 | // new Job (the more likely branch) |
108 | - $entity =$repositoriesJob->create(array("applyId" => (string) $applyId)); |
|
108 | + $entity = $repositoriesJob->create(array("applyId" => (string) $applyId)); |
|
109 | 109 | } else { |
110 | 110 | $createdJob = false; |
111 | 111 | } |
@@ -142,10 +142,10 @@ discard block |
||
142 | 142 | $entity->getPermissions()->grant($group, PermissionsInterface::PERMISSION_VIEW); |
143 | 143 | } |
144 | 144 | $result['isSaved'] = true; |
145 | - $log->info('Jobs/manage/saveJob [user: ' . $user->login . ']:' . var_export($p, true)); |
|
145 | + $log->info('Jobs/manage/saveJob [user: '.$user->login.']:'.var_export($p, true)); |
|
146 | 146 | |
147 | 147 | if (!empty($params->companyId)) { |
148 | - $companyId = $params->companyId . $loginSuffix; |
|
148 | + $companyId = $params->companyId.$loginSuffix; |
|
149 | 149 | $repOrganization = $repositories->get('Organizations/Organization'); |
150 | 150 | $hydratorManager = $services->get('hydratorManager'); |
151 | 151 | $hydrator = $hydratorManager->get('Hydrator/Organization'); |
@@ -194,7 +194,7 @@ discard block |
||
194 | 194 | $jobLocations->clear(); |
195 | 195 | foreach ($locations as $locData) { |
196 | 196 | $location = new Location(); |
197 | - $coords = array_map(function ($i) { return (float) $i; }, $locData['coordinates']); |
|
197 | + $coords = array_map(function($i) { return (float) $i; }, $locData['coordinates']); |
|
198 | 198 | $location->setCountry($locData['country']) |
199 | 199 | ->setRegion($locData['region']) |
200 | 200 | ->setCity($locData['city']) |
@@ -259,7 +259,7 @@ discard block |
||
259 | 259 | break; |
260 | 260 | } |
261 | 261 | if (array_key_exists($portal, $result['portals'])) { |
262 | - throw new \RuntimeException('Publisher-Events (internal error): There are two publisher registered for ' . $portal); |
|
262 | + throw new \RuntimeException('Publisher-Events (internal error): There are two publisher registered for '.$portal); |
|
263 | 263 | } |
264 | 264 | $result['portals'][$portal] = $status; |
265 | 265 | } else { |
@@ -272,16 +272,16 @@ discard block |
||
272 | 272 | } |
273 | 273 | } |
274 | 274 | } else { |
275 | - $log->info('Jobs/manage/saveJob [error: ' . $form->getMessages() . ']:' . var_export($p, true)); |
|
275 | + $log->info('Jobs/manage/saveJob [error: '.$form->getMessages().']:'.var_export($p, true)); |
|
276 | 276 | $result['valid Error'] = $form->getMessages(); |
277 | 277 | } |
278 | 278 | } |
279 | 279 | } else { |
280 | - $log->info('Jobs/manage/saveJob [error: session lost]:' . var_export($p, true)); |
|
280 | + $log->info('Jobs/manage/saveJob [error: session lost]:'.var_export($p, true)); |
|
281 | 281 | $result['message'] = 'session_id is lost'; |
282 | 282 | } |
283 | 283 | } catch (\Exception $e) { |
284 | - $result['message'] = 'exception occured: ' . $e->getMessage(); |
|
284 | + $result['message'] = 'exception occured: '.$e->getMessage(); |
|
285 | 285 | } |
286 | 286 | //$services->get('Core/Log')->info('Jobs/manage/saveJob result:' . PHP_EOL . var_export($p, True)); |
287 | 287 | return new JsonModel($result); |
@@ -41,9 +41,9 @@ discard block |
||
41 | 41 | |
42 | 42 | public function __construct(RepositoryService $repositoryService, AuthenticationService $auth, Acl $acl) |
43 | 43 | { |
44 | - $this->repositoryService=$repositoryService; |
|
45 | - $this->auth=$auth; |
|
46 | - $this->acl=$acl; |
|
44 | + $this->repositoryService = $repositoryService; |
|
45 | + $this->auth = $auth; |
|
46 | + $this->acl = $acl; |
|
47 | 47 | } |
48 | 48 | |
49 | 49 | public function __invoke() |
@@ -61,12 +61,12 @@ discard block |
||
61 | 61 | public function get(Params $params, $allowDraft = false) |
62 | 62 | { |
63 | 63 | /* @var \Jobs\Repository\Job $jobRepository */ |
64 | - $jobRepository = $this->repositoryService->get('Jobs/Job'); |
|
64 | + $jobRepository = $this->repositoryService->get('Jobs/Job'); |
|
65 | 65 | $idFromRoute = $params('id', 0); |
66 | 66 | $idFromQuery = $params->fromQuery('id', 0); |
67 | 67 | $idFromSubForm = $params->fromPost('job', 0); |
68 | 68 | |
69 | - $id = empty($idFromRoute)? (empty($idFromQuery)?$idFromSubForm:$idFromQuery) : $idFromRoute; |
|
69 | + $id = empty($idFromRoute) ? (empty($idFromQuery) ? $idFromSubForm : $idFromQuery) : $idFromRoute; |
|
70 | 70 | |
71 | 71 | if (empty($id) && $allowDraft) { |
72 | 72 | $this->acl->__invoke('Jobs/Manage', 'new'); |
@@ -84,7 +84,7 @@ discard block |
||
84 | 84 | |
85 | 85 | $job = $jobRepository->find($id); |
86 | 86 | if (!$job) { |
87 | - throw new \RuntimeException('No job found with id "' . $id . '"'); |
|
87 | + throw new \RuntimeException('No job found with id "'.$id.'"'); |
|
88 | 88 | } |
89 | 89 | return $job; |
90 | 90 | } |