@@ -30,9 +30,9 @@ |
||
30 | 30 | * @inheritdoc |
31 | 31 | * @return OrganizationsNameFieldset |
32 | 32 | */ |
33 | - public function __invoke( ContainerInterface $container, $requestedName, array $options = null ) |
|
33 | + public function __invoke(ContainerInterface $container, $requestedName, array $options = null) |
|
34 | 34 | { |
35 | - $fieldset = new OrganizationsNameFieldset($requestedName,$options); |
|
35 | + $fieldset = new OrganizationsNameFieldset($requestedName, $options); |
|
36 | 36 | |
37 | 37 | $fieldset->setRepositories($container->get('repositories')); |
38 | 38 | return $fieldset; |
@@ -40,7 +40,7 @@ |
||
40 | 40 | /** |
41 | 41 | * @param RepositoryService $repositories |
42 | 42 | */ |
43 | - public function setRepositories( $repositories ) |
|
43 | + public function setRepositories($repositories) |
|
44 | 44 | { |
45 | 45 | $this->repositories = $repositories; |
46 | 46 | } |
@@ -107,7 +107,7 @@ |
||
107 | 107 | * @return void |
108 | 108 | * @throws \InvalidArgumentException |
109 | 109 | */ |
110 | - public function setCreationOptions(array $options=null) |
|
110 | + public function setCreationOptions(array $options = null) |
|
111 | 111 | { |
112 | 112 | if (!isset($options['user']) || !$options['user'] instanceof UserInterface) { |
113 | 113 | throw new \InvalidArgumentException('An user interface is required!'); |
@@ -38,7 +38,7 @@ discard block |
||
38 | 38 | protected $country; |
39 | 39 | |
40 | 40 | |
41 | - public function __construct($uri, $country="DE", $cache = false) |
|
41 | + public function __construct($uri, $country = "DE", $cache = false) |
|
42 | 42 | { |
43 | 43 | $this->country = $country; |
44 | 44 | $this->client = $this->setupClient($uri); |
@@ -63,7 +63,7 @@ discard block |
||
63 | 63 | public function query($term, array $params = []) |
64 | 64 | { |
65 | 65 | /* @TODO: [ZF3] overriding $term value because it always returns null */ |
66 | - if(is_null($term)){ |
|
66 | + if (is_null($term)) { |
|
67 | 67 | $term = $_REQUEST['q']; |
68 | 68 | } |
69 | 69 | $cacheId = md5($term); |
@@ -76,7 +76,7 @@ discard block |
||
76 | 76 | |
77 | 77 | $response = $this->client->send(); |
78 | 78 | if ($response->getStatusCode() !== 200) { |
79 | - throw new \RuntimeException('Query failed, because ' . $response->getReasonPhrase()); |
|
79 | + throw new \RuntimeException('Query failed, because '.$response->getReasonPhrase()); |
|
80 | 80 | } |
81 | 81 | |
82 | 82 | $result = $response->getBody(); |
@@ -138,7 +138,7 @@ discard block |
||
138 | 138 | */ |
139 | 139 | public function setBirthDay($birthDay) |
140 | 140 | { |
141 | - $this->birthDay=$birthDay; |
|
141 | + $this->birthDay = $birthDay; |
|
142 | 142 | return $this; |
143 | 143 | } |
144 | 144 | |
@@ -159,7 +159,7 @@ discard block |
||
159 | 159 | */ |
160 | 160 | public function setBirthMonth($birthMonth) |
161 | 161 | { |
162 | - $this->birthMonth=$birthMonth; |
|
162 | + $this->birthMonth = $birthMonth; |
|
163 | 163 | return $this; |
164 | 164 | } |
165 | 165 | |
@@ -180,7 +180,7 @@ discard block |
||
180 | 180 | */ |
181 | 181 | public function setBirthYear($birthYear) |
182 | 182 | { |
183 | - $this->birthYear=$birthYear; |
|
183 | + $this->birthYear = $birthYear; |
|
184 | 184 | return $this; |
185 | 185 | } |
186 | 186 | |
@@ -201,7 +201,7 @@ discard block |
||
201 | 201 | */ |
202 | 202 | public function setEmail($email) |
203 | 203 | { |
204 | - $this->email = trim((String)$email); |
|
204 | + $this->email = trim((String) $email); |
|
205 | 205 | return $this; |
206 | 206 | } |
207 | 207 | |
@@ -244,7 +244,7 @@ discard block |
||
244 | 244 | */ |
245 | 245 | public function setFirstName($firstName) |
246 | 246 | { |
247 | - $this->firstName = trim((String)$firstName); |
|
247 | + $this->firstName = trim((String) $firstName); |
|
248 | 248 | return $this; |
249 | 249 | } |
250 | 250 | |
@@ -266,7 +266,7 @@ discard block |
||
266 | 266 | */ |
267 | 267 | public function setGender($gender) |
268 | 268 | { |
269 | - $this->gender = trim((String)$gender); |
|
269 | + $this->gender = trim((String) $gender); |
|
270 | 270 | return $this; |
271 | 271 | } |
272 | 272 | |
@@ -287,7 +287,7 @@ discard block |
||
287 | 287 | */ |
288 | 288 | public function setHouseNumber($houseNumber) |
289 | 289 | { |
290 | - $this->houseNumber=$houseNumber; |
|
290 | + $this->houseNumber = $houseNumber; |
|
291 | 291 | return $this; |
292 | 292 | } |
293 | 293 | |
@@ -332,7 +332,7 @@ discard block |
||
332 | 332 | if (!$this->lastName) { |
333 | 333 | return $emailIfEmpty ? $this->email : ''; |
334 | 334 | } |
335 | - return ($this->firstName ? $this->firstName . ' ' : '') . $this->lastName; |
|
335 | + return ($this->firstName ? $this->firstName.' ' : '').$this->lastName; |
|
336 | 336 | } |
337 | 337 | |
338 | 338 | /** |
@@ -426,7 +426,7 @@ discard block |
||
426 | 426 | */ |
427 | 427 | public function setStreet($street) |
428 | 428 | { |
429 | - $this->street=$street; |
|
429 | + $this->street = $street; |
|
430 | 430 | return $this; |
431 | 431 | } |
432 | 432 | |
@@ -447,7 +447,7 @@ discard block |
||
447 | 447 | */ |
448 | 448 | public function setCountry($country) |
449 | 449 | { |
450 | - $this->country=$country; |
|
450 | + $this->country = $country; |
|
451 | 451 | return $this; |
452 | 452 | } |
453 | 453 |
@@ -86,7 +86,7 @@ discard block |
||
86 | 86 | */ |
87 | 87 | public function setHouseNumber($houseNumber = "") |
88 | 88 | { |
89 | - $this->houseNumber=$houseNumber; |
|
89 | + $this->houseNumber = $houseNumber; |
|
90 | 90 | return $this; |
91 | 91 | } |
92 | 92 | |
@@ -152,7 +152,7 @@ discard block |
||
152 | 152 | */ |
153 | 153 | public function setStreet($street = "") |
154 | 154 | { |
155 | - $this->street=$street; |
|
155 | + $this->street = $street; |
|
156 | 156 | return $this; |
157 | 157 | } |
158 | 158 | |
@@ -174,7 +174,7 @@ discard block |
||
174 | 174 | */ |
175 | 175 | public function setCountry($country = "") |
176 | 176 | { |
177 | - $this->country=$country; |
|
177 | + $this->country = $country; |
|
178 | 178 | return $this; |
179 | 179 | } |
180 | 180 | |
@@ -199,7 +199,7 @@ discard block |
||
199 | 199 | */ |
200 | 200 | public function setPhone($phone = "") |
201 | 201 | { |
202 | - $this->phone=$phone; |
|
202 | + $this->phone = $phone; |
|
203 | 203 | return $this; |
204 | 204 | } |
205 | 205 | |
@@ -222,7 +222,7 @@ discard block |
||
222 | 222 | */ |
223 | 223 | public function setFax($fax = "") |
224 | 224 | { |
225 | - $this->fax=$fax; |
|
225 | + $this->fax = $fax; |
|
226 | 226 | return $this; |
227 | 227 | } |
228 | 228 |
@@ -68,7 +68,7 @@ discard block |
||
68 | 68 | public function __invoke(Job $jobEntity, $options = [], $urlParams = []) |
69 | 69 | { |
70 | 70 | |
71 | - $options= array_merge($this->options, $options); |
|
71 | + $options = array_merge($this->options, $options); |
|
72 | 72 | $paramsHelper = $this->paramsHelper; |
73 | 73 | $urlHelper = $this->urlHelper; |
74 | 74 | $serverUrlHelper = $this->serverUrlHelper; |
@@ -77,7 +77,7 @@ discard block |
||
77 | 77 | if (!empty($jobEntity->getLink())) { |
78 | 78 | $url = $jobEntity->getLink(); |
79 | 79 | $isExternalLink = true; |
80 | - }elseif($options['showPendingJobs']) { |
|
80 | + }elseif ($options['showPendingJobs']) { |
|
81 | 81 | $url = $urlHelper( |
82 | 82 | 'lang/jobs/approval', |
83 | 83 | [], |
@@ -87,10 +87,10 @@ discard block |
||
87 | 87 | ] |
88 | 88 | ], true); |
89 | 89 | |
90 | - }else{ |
|
90 | + } else { |
|
91 | 91 | |
92 | 92 | $query = [ |
93 | - 'subscriberUri' => $serverUrlHelper([]) . '/subscriber/' . 1, |
|
93 | + 'subscriberUri' => $serverUrlHelper([]).'/subscriber/'.1, |
|
94 | 94 | 'id' => $jobEntity->getId() |
95 | 95 | ]; |
96 | 96 | if ($jobEntity instanceOf JobSnapshot) { |
@@ -107,16 +107,16 @@ discard block |
||
107 | 107 | $url = $urlHelper($route, $params, array('query' => $query)); |
108 | 108 | } |
109 | 109 | |
110 | - if ($options['linkOnly']){ |
|
110 | + if ($options['linkOnly']) { |
|
111 | 111 | $result = $url; |
112 | - if ($options['absolute'] && !$isExternalLink){ |
|
112 | + if ($options['absolute'] && !$isExternalLink) { |
|
113 | 113 | $result = $serverUrlHelper($url); |
114 | 114 | } |
115 | - }else{ |
|
115 | + } else { |
|
116 | 116 | $result = sprintf('<a href="%s" rel="%s" %s>%s</a>', |
117 | 117 | $url, |
118 | 118 | $options['rel'], |
119 | - $options['target']?"target=" . $options['target']:"", |
|
119 | + $options['target'] ? "target=".$options['target'] : "", |
|
120 | 120 | strip_tags($jobEntity->getTitle())); |
121 | 121 | } |
122 | 122 | |
@@ -126,10 +126,10 @@ discard block |
||
126 | 126 | /** |
127 | 127 | * @param $options |
128 | 128 | */ |
129 | - public function setOptions($options){ |
|
130 | - foreach($options as $key=>$val) { |
|
131 | - if (array_key_exists($this->options,$key)) { |
|
132 | - $this->options[$key]=$val; |
|
129 | + public function setOptions($options) { |
|
130 | + foreach ($options as $key=>$val) { |
|
131 | + if (array_key_exists($this->options, $key)) { |
|
132 | + $this->options[$key] = $val; |
|
133 | 133 | } |
134 | 134 | } |
135 | 135 | } |
@@ -45,7 +45,7 @@ discard block |
||
45 | 45 | return $ob; |
46 | 46 | } |
47 | 47 | |
48 | - public function setContainer( ContainerInterface $container ) |
|
48 | + public function setContainer(ContainerInterface $container) |
|
49 | 49 | { |
50 | 50 | $this->repositories = $container->get('repositories'); |
51 | 51 | $this->formManager = $container->get('forms'); |
@@ -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,7 +96,7 @@ 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 | |
102 | 102 | } |
@@ -55,9 +55,9 @@ discard block |
||
55 | 55 | } |
56 | 56 | |
57 | 57 | $date = new \DateTime('today'); |
58 | - $date->sub(new \DateInterval('P' . $days . 'D')); |
|
58 | + $date->sub(new \DateInterval('P'.$days.'D')); |
|
59 | 59 | |
60 | - $query = [ |
|
60 | + $query = [ |
|
61 | 61 | '$and' => [ |
62 | 62 | ['status.name' => StatusInterface::ACTIVE], |
63 | 63 | ['$or' => [ |
@@ -73,7 +73,7 @@ discard block |
||
73 | 73 | |
74 | 74 | $offset = 0; |
75 | 75 | if ($limit && false !== strpos($limit, ',')) { |
76 | - list($limit,$offset) = explode(',', $limit); |
|
76 | + list($limit, $offset) = explode(',', $limit); |
|
77 | 77 | } |
78 | 78 | |
79 | 79 | $jobs = $jobsRepo->findBy($query, null, (int) $limit, (int) $offset); |
@@ -84,9 +84,9 @@ discard block |
||
84 | 84 | } |
85 | 85 | |
86 | 86 | if ($info) { |
87 | - echo count($jobs) , ' Jobs'; |
|
88 | - if ($offset) { echo ' starting from ' . $offset; } |
|
89 | - echo PHP_EOL . PHP_EOL; |
|
87 | + echo count($jobs), ' Jobs'; |
|
88 | + if ($offset) { echo ' starting from '.$offset; } |
|
89 | + echo PHP_EOL.PHP_EOL; |
|
90 | 90 | $this->listExpiredJobs($jobs); |
91 | 91 | return; |
92 | 92 | } |
@@ -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 | } |