@@ -96,11 +96,10 @@ discard block |
||
| 96 | 96 | $array += $this->generateSalary(); |
| 97 | 97 | |
| 98 | 98 | /** |
| 99 | - * TODO: make this working |
|
| 99 | + * TODO: make this working |
|
| 100 | 100 | |
| 101 | 101 | $array=array_merge_recursive($this->getDefault,$default,$array); |
| 102 | - |
|
| 103 | - */ |
|
| 102 | + */ |
|
| 104 | 103 | |
| 105 | 104 | return Json::encode($array); |
| 106 | 105 | } |
@@ -244,50 +243,50 @@ discard block |
||
| 244 | 243 | string(19) "2020-06-12 18:59:45" |
| 245 | 244 | ["identifier"]=> |
| 246 | 245 | array(3) { |
| 247 | - ["@type"]=> |
|
| 248 | - string(13) "PropertyValue" |
|
| 249 | - ["value"]=> |
|
| 250 | - string(24) "5c8115410acec3d470a03e41" |
|
| 251 | - ["name"]=> |
|
| 252 | - string(8) "Firma XY" |
|
| 246 | + ["@type"]=> |
|
| 247 | + string(13) "PropertyValue" |
|
| 248 | + ["value"]=> |
|
| 249 | + string(24) "5c8115410acec3d470a03e41" |
|
| 250 | + ["name"]=> |
|
| 251 | + string(8) "Firma XY" |
|
| 253 | 252 | } |
| 254 | 253 | ["hiringOrganization"]=> |
| 255 | 254 | array(3) { |
| 256 | - ["@type"]=> |
|
| 257 | - string(12) "Organization" |
|
| 258 | - ["name"]=> |
|
| 259 | - string(8) "Firma XY" |
|
| 260 | - ["logo"]=> |
|
| 261 | - string(72) "/file/Organizations.OrganizationImage/58f8e3124e197f5d78e3fed7/YAWIK.jpg" |
|
| 255 | + ["@type"]=> |
|
| 256 | + string(12) "Organization" |
|
| 257 | + ["name"]=> |
|
| 258 | + string(8) "Firma XY" |
|
| 259 | + ["logo"]=> |
|
| 260 | + string(72) "/file/Organizations.OrganizationImage/58f8e3124e197f5d78e3fed7/YAWIK.jpg" |
|
| 262 | 261 | } |
| 263 | 262 | ["jobLocation"]=> |
| 264 | 263 | array(1) { |
| 265 | - [0]=> |
|
| 266 | - array(2) { |
|
| 264 | + [0]=> |
|
| 265 | + array(2) { |
|
| 267 | 266 | ["@type"]=> |
| 268 | 267 | string(5) "Place" |
| 269 | 268 | ["address"]=> |
| 270 | 269 | array(6) { |
| 271 | - ["@type"]=> |
|
| 272 | - string(13) "PostalAddress" |
|
| 273 | - ["streetAddress"]=> |
|
| 274 | - string(1) " " |
|
| 275 | - ["postalCode"]=> |
|
| 276 | - NULL |
|
| 277 | - ["addressLocality"]=> |
|
| 278 | - string(6) "Vechta" |
|
| 279 | - ["addressCountry"]=> |
|
| 280 | - NULL |
|
| 281 | - ["addressRegion"]=> |
|
| 282 | - string(13) "Niedersachsen" |
|
| 270 | + ["@type"]=> |
|
| 271 | + string(13) "PostalAddress" |
|
| 272 | + ["streetAddress"]=> |
|
| 273 | + string(1) " " |
|
| 274 | + ["postalCode"]=> |
|
| 275 | + NULL |
|
| 276 | + ["addressLocality"]=> |
|
| 277 | + string(6) "Vechta" |
|
| 278 | + ["addressCountry"]=> |
|
| 279 | + NULL |
|
| 280 | + ["addressRegion"]=> |
|
| 281 | + string(13) "Niedersachsen" |
|
| 282 | + } |
|
| 283 | 283 | } |
| 284 | - } |
|
| 285 | 284 | } |
| 286 | 285 | ["employmentType"]=> |
| 287 | 286 | array(1) { |
| 288 | - [0]=> |
|
| 289 | - string(9) "permanent" |
|
| 287 | + [0]=> |
|
| 288 | + string(9) "permanent" |
|
| 290 | 289 | } |
| 291 | 290 | ["validThrough"]=> |
| 292 | 291 | string(19) "2020-12-09 18:59:45" |
| 293 | - } |
|
| 294 | 292 | \ No newline at end of file |
| 293 | + } |
|
| 295 | 294 | \ No newline at end of file |
@@ -56,7 +56,7 @@ discard block |
||
| 56 | 56 | $this->options = array_intersect_key($new, $this->options); |
| 57 | 57 | } |
| 58 | 58 | |
| 59 | - public function toJsonLd($default=[]) |
|
| 59 | + public function toJsonLd($default = []) |
|
| 60 | 60 | { |
| 61 | 61 | $organization = $this->job->getOrganization(); |
| 62 | 62 | $organizationName = $organization ? $organization->getOrganizationName()->getName() : $this->job->getCompany(); |
@@ -86,7 +86,7 @@ discard block |
||
| 86 | 86 | 'hiringOrganization' => [ |
| 87 | 87 | '@type' => 'Organization', |
| 88 | 88 | 'name' => $organizationName, |
| 89 | - 'logo' => $logo ? rtrim($this->options['server_url'], '/') . $logo : '', |
|
| 89 | + 'logo' => $logo ? rtrim($this->options['server_url'], '/').$logo : '', |
|
| 90 | 90 | ], |
| 91 | 91 | 'jobLocation' => $this->getLocations($this->job->getLocations()), |
| 92 | 92 | 'employmentType' => $this->job->getClassifications()->getEmploymentTypes()->getValues(), |
@@ -111,7 +111,7 @@ discard block |
||
| 111 | 111 | private function getLogo() { |
| 112 | 112 | $organization = $this->job->getOrganization(); |
| 113 | 113 | |
| 114 | - $organizationLogo = ($organization && $organization->getImage())? $organization->getImage()->getUri() : $this->job->getLogoRef(); |
|
| 114 | + $organizationLogo = ($organization && $organization->getImage()) ? $organization->getImage()->getUri() : $this->job->getLogoRef(); |
|
| 115 | 115 | return $organizationLogo; |
| 116 | 116 | } |
| 117 | 117 | |
@@ -124,7 +124,7 @@ discard block |
||
| 124 | 124 | */ |
| 125 | 125 | private function getLocations($locations) |
| 126 | 126 | { |
| 127 | - $array=[]; |
|
| 127 | + $array = []; |
|
| 128 | 128 | foreach ($locations as $location) { /* @var \Core\Entity\LocationInterface $location */ |
| 129 | 129 | array_push( |
| 130 | 130 | $array, |
@@ -132,7 +132,7 @@ discard block |
||
| 132 | 132 | '@type' => 'Place', |
| 133 | 133 | 'address' => [ |
| 134 | 134 | '@type' => 'PostalAddress', |
| 135 | - 'streetAddress' => $location->getStreetname() .' '.$location->getStreetnumber(), |
|
| 135 | + 'streetAddress' => $location->getStreetname().' '.$location->getStreetnumber(), |
|
| 136 | 136 | 'postalCode' => $location->getPostalCode(), |
| 137 | 137 | 'addressLocality' => $location->getCity(), |
| 138 | 138 | 'addressCountry' => $location->getCountry(), |
@@ -156,9 +156,9 @@ discard block |
||
| 156 | 156 | $html = $values->getHtml(); |
| 157 | 157 | |
| 158 | 158 | if ($html) { |
| 159 | - $description=sprintf("%s", $values->getHtml() ); |
|
| 159 | + $description = sprintf("%s", $values->getHtml()); |
|
| 160 | 160 | } else { |
| 161 | - $description=sprintf( |
|
| 161 | + $description = sprintf( |
|
| 162 | 162 | "<p>%s</p>". |
| 163 | 163 | "<h1>%s</h1>". |
| 164 | 164 | "<h3>Requirements</h3><p>%s</p>". |
@@ -196,7 +196,7 @@ discard block |
||
| 196 | 196 | ]; |
| 197 | 197 | } |
| 198 | 198 | |
| 199 | - private function getDefault(){ |
|
| 199 | + private function getDefault() { |
|
| 200 | 200 | return [ |
| 201 | 201 | '@context'=>'http://schema.org/', |
| 202 | 202 | '@type' => 'JobPosting', |