@@ -26,6 +26,6 @@ |
||
26 | 26 | $repositories = $container->get('repositories'); |
27 | 27 | $coreFileEvents = $container->get('Core/File/Events'); |
28 | 28 | |
29 | - return new FileController($repositories,$coreFileEvents); |
|
29 | + return new FileController($repositories, $coreFileEvents); |
|
30 | 30 | } |
31 | 31 | } |
@@ -82,7 +82,7 @@ discard block |
||
82 | 82 | { |
83 | 83 | |
84 | 84 | $result = $this->pagination([ |
85 | - 'params' => ['Organizations_Profile',[ |
|
85 | + 'params' => ['Organizations_Profile', [ |
|
86 | 86 | 'q', |
87 | 87 | 'count' => $this->options['count'], |
88 | 88 | 'page' => 1, |
@@ -116,7 +116,7 @@ discard block |
||
116 | 116 | $repo = $this->repo; |
117 | 117 | $id = $this->params('id'); |
118 | 118 | |
119 | - if(is_null($id)){ |
|
119 | + if (is_null($id)) { |
|
120 | 120 | $this->getResponse()->setStatusCode(Response::STATUS_CODE_404); |
121 | 121 | return [ |
122 | 122 | 'message' => $translator->translate('Can not access profile page without id'), |
@@ -125,20 +125,20 @@ discard block |
||
125 | 125 | } |
126 | 126 | |
127 | 127 | $organization = $repo->find($id); |
128 | - if(!$organization instanceof Organization){ |
|
128 | + if (!$organization instanceof Organization) { |
|
129 | 129 | throw new NotFoundException($id); |
130 | 130 | } |
131 | 131 | |
132 | - if( |
|
132 | + if ( |
|
133 | 133 | Organization::PROFILE_DISABLED == $organization->getProfileSetting() |
134 | 134 | || is_null($organization->getProfileSetting()) |
135 | - ){ |
|
135 | + ) { |
|
136 | 136 | throw new UnauthorizedAccessException(/*@translate*/ 'This Organization Profile is disabled'); |
137 | 137 | } |
138 | 138 | |
139 | 139 | $result = $this->pagination([ |
140 | 140 | 'params' => [ |
141 | - 'Organization_Jobs',[ |
|
141 | + 'Organization_Jobs', [ |
|
142 | 142 | 'q', |
143 | 143 | 'organization_id' => $id, |
144 | 144 | 'count' => $this->options['count'], |
@@ -151,13 +151,13 @@ discard block |
||
151 | 151 | ], |
152 | 152 | ]); |
153 | 153 | |
154 | - if( |
|
154 | + if ( |
|
155 | 155 | Organization::PROFILE_ACTIVE_JOBS == $organization->getProfileSetting() |
156 | - ){ |
|
156 | + ) { |
|
157 | 157 | /* @var \Zend\Paginator\Paginator $paginator */ |
158 | 158 | $paginator = $result['jobs']; |
159 | 159 | $count = $paginator->getTotalItemCount(); |
160 | - if(0===$count){ |
|
160 | + if (0 === $count) { |
|
161 | 161 | throw new UnauthorizedAccessException($this->translator->translate('This Organization Profile is disabled')); |
162 | 162 | } |
163 | 163 | } |
@@ -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 |
@@ -40,7 +40,7 @@ |
||
40 | 40 | ['name' => 'StringTrim'], |
41 | 41 | ['name' => 'Alpha'], |
42 | 42 | ], |
43 | - ]); |
|
43 | + ]); |
|
44 | 44 | |
45 | 45 | $controller = new ApiJobListByOrganizationController($jobRepository, $apiJobDehydrator, $inputFilter); |
46 | 46 |
@@ -22,11 +22,11 @@ discard block |
||
22 | 22 | */ |
23 | 23 | protected $url; |
24 | 24 | |
25 | - /** |
|
26 | - * ViewHelper for generating an url to a job posting |
|
27 | - * |
|
28 | - * @var JobUrl $jobUrl |
|
29 | - */ |
|
25 | + /** |
|
26 | + * ViewHelper for generating an url to a job posting |
|
27 | + * |
|
28 | + * @var JobUrl $jobUrl |
|
29 | + */ |
|
30 | 30 | protected $jobUrl; |
31 | 31 | |
32 | 32 | /** |
@@ -40,11 +40,11 @@ discard block |
||
40 | 40 | return $this; |
41 | 41 | } |
42 | 42 | |
43 | - /** |
|
44 | - * @param JobUrl $url |
|
45 | - * |
|
46 | - * @return $this |
|
47 | - */ |
|
43 | + /** |
|
44 | + * @param JobUrl $url |
|
45 | + * |
|
46 | + * @return $this |
|
47 | + */ |
|
48 | 48 | public function setJobUrl($url) |
49 | 49 | { |
50 | 50 | $this->jobUrl = $url; |
@@ -64,8 +64,8 @@ discard block |
||
64 | 64 | 'location' => $job->getLocation(), |
65 | 65 | 'link' => $this->jobUrl->__invoke( |
66 | 66 | $job,[ |
67 | - 'linkOnly'=> true, |
|
68 | - 'absolute' => true, |
|
67 | + 'linkOnly'=> true, |
|
68 | + 'absolute' => true, |
|
69 | 69 | ] |
70 | 70 | ), |
71 | 71 | 'organization' => array( |
@@ -63,7 +63,7 @@ |
||
63 | 63 | 'title' => $job->getTitle(), |
64 | 64 | 'location' => $job->getLocation(), |
65 | 65 | 'link' => $this->jobUrl->__invoke( |
66 | - $job,[ |
|
66 | + $job, [ |
|
67 | 67 | 'linkOnly'=> true, |
68 | 68 | 'absolute' => true, |
69 | 69 | ] |
@@ -20,14 +20,14 @@ discard block |
||
20 | 20 | * Sets the Postal Code of a location |
21 | 21 | * |
22 | 22 | * @param string $postalCode |
23 | - * @return mixed |
|
23 | + * @return AbstractLocation |
|
24 | 24 | */ |
25 | 25 | public function setPostalCode($postalCode); |
26 | 26 | |
27 | 27 | /** |
28 | 28 | * Gets the Postal Code of a location |
29 | 29 | * |
30 | - * @return mixed |
|
30 | + * @return string |
|
31 | 31 | */ |
32 | 32 | public function getPostalCode(); |
33 | 33 | |
@@ -44,6 +44,7 @@ discard block |
||
44 | 44 | * |
45 | 45 | * @param GeoJson $coordinates |
46 | 46 | * @internal param $point |
47 | + * @return AbstractLocation |
|
47 | 48 | */ |
48 | 49 | public function setCoordinates(GeoJson $coordinates); |
49 | 50 | |
@@ -51,7 +52,7 @@ discard block |
||
51 | 52 | * Sets the city name of a Location |
52 | 53 | * |
53 | 54 | * @param $city |
54 | - * @return mixed |
|
55 | + * @return AbstractLocation |
|
55 | 56 | */ |
56 | 57 | public function setCity($city); |
57 | 58 | |
@@ -66,14 +67,14 @@ discard block |
||
66 | 67 | * Sets the country of a location |
67 | 68 | * |
68 | 69 | * @param $country |
69 | - * @return mixed |
|
70 | + * @return AbstractLocation |
|
70 | 71 | */ |
71 | 72 | public function setCountry($country); |
72 | 73 | |
73 | 74 | /** |
74 | 75 | * Gets the country of a location |
75 | 76 | * |
76 | - * @return mixed |
|
77 | + * @return string |
|
77 | 78 | */ |
78 | 79 | public function getCountry(); |
79 | 80 | |
@@ -81,7 +82,7 @@ discard block |
||
81 | 82 | * Sets the region of a location. Eg. "Hessen" is a region in "Germany" |
82 | 83 | * |
83 | 84 | * @param $region |
84 | - * @return mixed |
|
85 | + * @return AbstractLocation |
|
85 | 86 | */ |
86 | 87 | public function setRegion($region); |
87 | 88 | |
@@ -96,14 +97,14 @@ discard block |
||
96 | 97 | * Sets the Streetname of a location |
97 | 98 | * |
98 | 99 | * @param $street |
99 | - * @return mixed |
|
100 | + * @return AbstractLocation |
|
100 | 101 | */ |
101 | 102 | public function setStreetname($street); |
102 | 103 | |
103 | 104 | /** |
104 | 105 | * Gets the streetname of a location |
105 | 106 | * |
106 | - * @return mixed |
|
107 | + * @return string |
|
107 | 108 | */ |
108 | 109 | public function getStreetname(); |
109 | 110 | |
@@ -111,14 +112,14 @@ discard block |
||
111 | 112 | * Sets the Streetnumber of a location |
112 | 113 | * |
113 | 114 | * @param $number |
114 | - * @return mixed |
|
115 | + * @return AbstractLocation |
|
115 | 116 | */ |
116 | 117 | public function setStreetnumber($number); |
117 | 118 | |
118 | 119 | /** |
119 | 120 | * Gets the streetnumber of a location |
120 | 121 | * |
121 | - * @return mixeed |
|
122 | + * @return string |
|
122 | 123 | */ |
123 | 124 | public function getStreetnumber(); |
124 | 125 | } |
@@ -82,6 +82,7 @@ |
||
82 | 82 | * Generates a location array |
83 | 83 | * |
84 | 84 | * @param Collection $locations, |
85 | + * @param string $locations |
|
85 | 86 | * |
86 | 87 | * @return array |
87 | 88 | */ |
@@ -52,7 +52,7 @@ discard block |
||
52 | 52 | $dateStart = $this->job->getDatePublishStart(); |
53 | 53 | $dateStart = $dateStart ? $dateStart->format('Y-m-d') : null; |
54 | 54 | |
55 | - $array=[ |
|
55 | + $array = [ |
|
56 | 56 | '@context'=>'http://schema.org/', |
57 | 57 | '@type' => 'JobPosting', |
58 | 58 | 'title' => $this->job->getTitle(), |
@@ -85,16 +85,16 @@ discard block |
||
85 | 85 | * |
86 | 86 | * @return array |
87 | 87 | */ |
88 | - private function getLocations($locations){ |
|
89 | - $array=[]; |
|
90 | - foreach($locations as $location){ /* @var \Core\Entity\LocationInterface $location */ |
|
88 | + private function getLocations($locations) { |
|
89 | + $array = []; |
|
90 | + foreach ($locations as $location) { /* @var \Core\Entity\LocationInterface $location */ |
|
91 | 91 | array_push( |
92 | 92 | $array, |
93 | 93 | [ |
94 | 94 | '@type' => 'Place', |
95 | 95 | 'address' => [ |
96 | 96 | '@type' => 'PostalAddress', |
97 | - 'streetAddress' => $location->getStreetname() .' '.$location->getStreetnumber(), |
|
97 | + 'streetAddress' => $location->getStreetname().' '.$location->getStreetnumber(), |
|
98 | 98 | 'postalCode' => $location->getPostalCode(), |
99 | 99 | 'addressLocality' => $location->getCity(), |
100 | 100 | 'addressCountry' => $location->getCountry(), |
@@ -114,7 +114,7 @@ discard block |
||
114 | 114 | */ |
115 | 115 | private function getDescription(TemplateValuesInterface $values) { |
116 | 116 | |
117 | - $description=sprintf( |
|
117 | + $description = sprintf( |
|
118 | 118 | "<p>%s</p>". |
119 | 119 | "<h1>%s</h1>". |
120 | 120 | "<h3>Requirements</h3><p>%s</p>". |