@@ -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>". |