@@ -108,6 +108,9 @@ |
||
108 | 108 | return parent::setSubject($subject); |
109 | 109 | } |
110 | 110 | |
111 | + /** |
|
112 | + * @param string $formatString |
|
113 | + */ |
|
111 | 114 | public function setFormattedSubject($formatString) |
112 | 115 | { |
113 | 116 | $args = func_get_args(); |
@@ -30,7 +30,7 @@ |
||
30 | 30 | * @param array $defaultParams |
31 | 31 | * @param bool $usePostParams |
32 | 32 | * |
33 | - * @return mixed |
|
33 | + * @return ZendPaginator |
|
34 | 34 | */ |
35 | 35 | public function __invoke($paginatorName, $defaultParams = array(), $usePostParams = false) |
36 | 36 | { |
@@ -42,7 +42,7 @@ |
||
42 | 42 | $this->filterSortParam($params); |
43 | 43 | $paginator = $this->createPaginator($repository, $params); |
44 | 44 | $paginator->setCurrentPageNumber($params->get('page', 1)) |
45 | - ->setItemCountPerPage($params->get('count', 10)); |
|
45 | + ->setItemCountPerPage($params->get('count', 10)); |
|
46 | 46 | |
47 | 47 | return $paginator; |
48 | 48 |
@@ -61,11 +61,11 @@ |
||
61 | 61 | $paginatorManager = $this->serviceManager->get('Core/PaginatorService'); |
62 | 62 | $paginator = $paginatorManager->get($paginatorName); |
63 | 63 | if (!isset($paginator) || !$paginator instanceof ZendPaginator) { |
64 | - throw new \RuntimeException('Could not create paginator ' . $paginatorName); |
|
64 | + throw new \RuntimeException('Could not create paginator '.$paginatorName); |
|
65 | 65 | } |
66 | 66 | $adapter = $paginator->getAdapter(); |
67 | 67 | if (!isset($adapter) || !$adapter instanceof AdapterInterface) { |
68 | - throw new \RuntimeException('Paginator ' . $paginatorName . ' has no Adapter'); |
|
68 | + throw new \RuntimeException('Paginator '.$paginatorName.' has no Adapter'); |
|
69 | 69 | } |
70 | 70 | |
71 | 71 | $params = $usePostParams |
@@ -179,9 +179,9 @@ discard block |
||
179 | 179 | $location = new Location(); |
180 | 180 | $coords = array_map(function($i) { return (float) $i; }, $locData['coordinates']); |
181 | 181 | $location->setCountry($locData['country']) |
182 | - ->setRegion($locData['region']) |
|
183 | - ->setCity($locData['city']) |
|
184 | - ->setCoordinates(new Point($coords)); |
|
182 | + ->setRegion($locData['region']) |
|
183 | + ->setCity($locData['city']) |
|
184 | + ->setCoordinates(new Point($coords)); |
|
185 | 185 | |
186 | 186 | $jobLocations->add($location); |
187 | 187 | } |
@@ -212,7 +212,7 @@ discard block |
||
212 | 212 | /* @var $jobEvents \Zend\EventManager\EventManager */ |
213 | 213 | $jobEvents = $services->get('Jobs/Events'); |
214 | 214 | $jobEvent->setName(JobEvent::EVENT_JOB_ACCEPTED) |
215 | - ->setTarget($this); |
|
215 | + ->setTarget($this); |
|
216 | 216 | $responses = $jobEvents->trigger($jobEvent); |
217 | 217 | foreach ($responses as $response) { |
218 | 218 | // responses from the portals |
@@ -82,7 +82,7 @@ discard block |
||
82 | 82 | $entity = $repositoriesJob->findOneBy(array("applyId" => (string) $applyId)); |
83 | 83 | if (!isset($entity)) { |
84 | 84 | // new Job (the more likely branch) |
85 | - $entity =$repositoriesJob->create(array("applyId" => (string) $applyId)); |
|
85 | + $entity = $repositoriesJob->create(array("applyId" => (string) $applyId)); |
|
86 | 86 | } else { |
87 | 87 | $createdJob = false; |
88 | 88 | } |
@@ -125,10 +125,10 @@ discard block |
||
125 | 125 | $entity->getPermissions()->grant($group, PermissionsInterface::PERMISSION_VIEW); |
126 | 126 | } |
127 | 127 | $result['isSaved'] = true; |
128 | - $log->info('Jobs/manage/saveJob [user: ' . $user->login . ']:' . var_export($p, true)); |
|
128 | + $log->info('Jobs/manage/saveJob [user: '.$user->login.']:'.var_export($p, true)); |
|
129 | 129 | |
130 | 130 | if (!empty($params->companyId)) { |
131 | - $companyId = $params->companyId . $loginSuffix; |
|
131 | + $companyId = $params->companyId.$loginSuffix; |
|
132 | 132 | $repOrganization = $repositories->get('Organizations/Organization'); |
133 | 133 | $hydratorManager = $services->get('hydratorManager'); |
134 | 134 | /* @var \Organizations\Entity\Hydrator\OrganizationHydrator $hydrator */ |
@@ -179,7 +179,7 @@ discard block |
||
179 | 179 | $jobLocations->clear(); |
180 | 180 | foreach ($locations as $locData) { |
181 | 181 | $location = new Location(); |
182 | - $coords = array_map(function ($i) { return (float) $i; }, $locData['coordinates']); |
|
182 | + $coords = array_map(function($i) { return (float) $i; }, $locData['coordinates']); |
|
183 | 183 | $location->setCountry($locData['country']) |
184 | 184 | ->setRegion($locData['region']) |
185 | 185 | ->setCity($locData['city']) |
@@ -244,7 +244,7 @@ discard block |
||
244 | 244 | break; |
245 | 245 | } |
246 | 246 | if (array_key_exists($portal, $result['portals'])) { |
247 | - throw new \RuntimeException('Publisher-Events (internal error): There are two publisher registered for ' . $portal); |
|
247 | + throw new \RuntimeException('Publisher-Events (internal error): There are two publisher registered for '.$portal); |
|
248 | 248 | } |
249 | 249 | $result['portals'][$portal] = $status; |
250 | 250 | } else { |
@@ -257,16 +257,16 @@ discard block |
||
257 | 257 | } |
258 | 258 | } |
259 | 259 | } else { |
260 | - $log->info('Jobs/manage/saveJob [error: ' . $form->getMessages() . ']:' . var_export($p, true)); |
|
260 | + $log->info('Jobs/manage/saveJob [error: '.$form->getMessages().']:'.var_export($p, true)); |
|
261 | 261 | $result['valid Error'] = $form->getMessages(); |
262 | 262 | } |
263 | 263 | } |
264 | 264 | } else { |
265 | - $log->info('Jobs/manage/saveJob [error: session lost]:' . var_export($p, true)); |
|
265 | + $log->info('Jobs/manage/saveJob [error: session lost]:'.var_export($p, true)); |
|
266 | 266 | $result['message'] = 'session_id is lost'; |
267 | 267 | } |
268 | 268 | } catch (\Exception $e) { |
269 | - $result['message'] = 'exception occured: ' . $e->getMessage(); |
|
269 | + $result['message'] = 'exception occured: '.$e->getMessage(); |
|
270 | 270 | } |
271 | 271 | //$services->get('Core/Log')->info('Jobs/manage/saveJob result:' . PHP_EOL . var_export($p, True)); |
272 | 272 | return new JsonModel($result); |
@@ -77,6 +77,7 @@ discard block |
||
77 | 77 | |
78 | 78 | /** |
79 | 79 | * @param string $description |
80 | + * @param double[] $params |
|
80 | 81 | * |
81 | 82 | * @return $this |
82 | 83 | */ |
@@ -258,7 +259,7 @@ discard block |
||
258 | 259 | } |
259 | 260 | |
260 | 261 | /** |
261 | - * @param $spec |
|
262 | + * @param string $spec |
|
262 | 263 | * |
263 | 264 | * @return $this |
264 | 265 | */ |
@@ -80,7 +80,7 @@ discard block |
||
80 | 80 | * |
81 | 81 | * @return $this |
82 | 82 | */ |
83 | - public function setDescription($description,$params = null) |
|
83 | + public function setDescription($description, $params = null) |
|
84 | 84 | { |
85 | 85 | $this->options['description'] = $description; |
86 | 86 | $this->options['description_params'] = $params; |
@@ -350,9 +350,9 @@ discard block |
||
350 | 350 | if (!$inputExists && $required) { |
351 | 351 | $fieldsetName = ''; |
352 | 352 | if ($fieldset->hasAttribute('name')) { |
353 | - $fieldsetName = 'in Fieldset "' . $fieldset->getAttribute('name') . '" '; |
|
353 | + $fieldsetName = 'in Fieldset "'.$fieldset->getAttribute('name').'" '; |
|
354 | 354 | } |
355 | - throw new \RuntimeException('input for "' . $name . '" ' . $fieldsetName . 'is required but a input-field with this name is not defined'); |
|
355 | + throw new \RuntimeException('input for "'.$name.'" '.$fieldsetName.'is required but a input-field with this name is not defined'); |
|
356 | 356 | } |
357 | 357 | } |
358 | 358 | } |
@@ -36,7 +36,7 @@ discard block |
||
36 | 36 | } |
37 | 37 | |
38 | 38 | /** |
39 | - * @param $name |
|
39 | + * @param string $name |
|
40 | 40 | * |
41 | 41 | * @return mixed |
42 | 42 | */ |
@@ -59,7 +59,7 @@ discard block |
||
59 | 59 | /** |
60 | 60 | * @param array $data |
61 | 61 | * |
62 | - * @return mixed |
|
62 | + * @return EntityInterface |
|
63 | 63 | */ |
64 | 64 | public function create(array $data = null) |
65 | 65 | { |
@@ -83,7 +83,7 @@ |
||
83 | 83 | */ |
84 | 84 | public function store($entity) |
85 | 85 | { |
86 | - if ( !($entity instanceOf $this->entityPrototype) ) { |
|
86 | + if (!($entity instanceOf $this->entityPrototype)) { |
|
87 | 87 | throw new \InvalidArgumentException(sprintf( |
88 | 88 | 'Entity must be of type %s but recieved %s instead', |
89 | 89 | get_class($this->entityPrototype), |
@@ -32,7 +32,6 @@ |
||
32 | 32 | } |
33 | 33 | |
34 | 34 | /** |
35 | - * @param mixed $value$organizationImageEntity |
|
36 | 35 | * |
37 | 36 | * @return mixed |
38 | 37 | */ |
@@ -81,7 +81,7 @@ discard block |
||
81 | 81 | */ |
82 | 82 | public function setLabelQualifications($labelQualifications) |
83 | 83 | { |
84 | - $this->labelQualifications=$labelQualifications; |
|
84 | + $this->labelQualifications = $labelQualifications; |
|
85 | 85 | return $this; |
86 | 86 | } |
87 | 87 | |
@@ -104,7 +104,7 @@ discard block |
||
104 | 104 | */ |
105 | 105 | public function setLabelBenefits($labelBenefits) |
106 | 106 | { |
107 | - $this->labelBenefits=$labelBenefits; |
|
107 | + $this->labelBenefits = $labelBenefits; |
|
108 | 108 | return $this; |
109 | 109 | } |
110 | 110 |
@@ -31,7 +31,7 @@ |
||
31 | 31 | * |
32 | 32 | * @param ServiceLocatorInterface $serviceLocator |
33 | 33 | * |
34 | - * @return mixed |
|
34 | + * @return \Zend\EventManager\EventManagerInterface |
|
35 | 35 | */ |
36 | 36 | public function createService(ServiceLocatorInterface $serviceLocator) |
37 | 37 | { |
@@ -46,7 +46,7 @@ discard block |
||
46 | 46 | { |
47 | 47 | $query = $this->params()->fromQuery(); |
48 | 48 | |
49 | - switch($this->plugin){ |
|
49 | + switch ($this->plugin) { |
|
50 | 50 | case 'photon': |
51 | 51 | /* @var Plugin\Photon $geoApi */ |
52 | 52 | $geoApi = $this->getPluginManager()->get('geo/photon'); |
@@ -60,19 +60,19 @@ discard block |
||
60 | 60 | } |
61 | 61 | $result = array(); |
62 | 62 | if (!empty($query['q'])) { |
63 | - $result = $geoApi($query['q'], $this->geoCoderUrl, $this->params('lang','de')); |
|
63 | + $result = $geoApi($query['q'], $this->geoCoderUrl, $this->params('lang', 'de')); |
|
64 | 64 | } |
65 | 65 | $viewModel = new JsonModel($result); |
66 | 66 | /* @var \Zend\Http\Response $response */ |
67 | 67 | $response = $this->getResponse(); |
68 | 68 | |
69 | 69 | $date = new \DateTime(); |
70 | - $expires=$date->modify('+100 day'); |
|
70 | + $expires = $date->modify('+100 day'); |
|
71 | 71 | |
72 | 72 | $response->getHeaders() |
73 | - ->addHeaderLine('Pragma','cache') |
|
74 | - ->addHeaderLine('Cache-Control',"max-age=290304000, public") |
|
75 | - ->addHeaderLine('Expires',$expires->format(\DateTime::RFC1036)); |
|
73 | + ->addHeaderLine('Pragma', 'cache') |
|
74 | + ->addHeaderLine('Cache-Control', "max-age=290304000, public") |
|
75 | + ->addHeaderLine('Expires', $expires->format(\DateTime::RFC1036)); |
|
76 | 76 | |
77 | 77 | return $viewModel; |
78 | 78 | } |