@@ -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 |
@@ -41,6 +41,9 @@ discard block |
||
41 | 41 | */ |
42 | 42 | protected $message; |
43 | 43 | |
44 | + /** |
|
45 | + * @param StatusInterface $status |
|
46 | + */ |
|
44 | 47 | public function __construct($status, $message = '[System]') |
45 | 48 | { |
46 | 49 | if (!$status instanceof StatusInterface) { |
@@ -116,7 +119,7 @@ discard block |
||
116 | 119 | /** |
117 | 120 | * Sets the history message |
118 | 121 | * |
119 | - * @param $message |
|
122 | + * @param string $message |
|
120 | 123 | * |
121 | 124 | * @return $this |
122 | 125 | */ |
@@ -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 | } |
@@ -197,10 +197,10 @@ |
||
197 | 197 | public function setOption($name,$value){ |
198 | 198 | if (array_key_exists($name, $this->options)) { |
199 | 199 | $this->options[$name] = $value; |
200 | - }elseif ('language' == $name or 'language_url' == $name ) { |
|
200 | + } elseif ('language' == $name or 'language_url' == $name ) { |
|
201 | 201 | $this->options[$name] = $value; |
202 | 202 | |
203 | - }else{ |
|
203 | + } else{ |
|
204 | 204 | throw new \InvalidArgumentException('Unknown Option ' . $name . ' in ' . __FILE__ . ' Line ' . __LINE__ ); |
205 | 205 | } |
206 | 206 | } |
@@ -134,8 +134,8 @@ |
||
134 | 134 | $elementOptions = $element->getOptions(); |
135 | 135 | if (array_key_exists('placeholder', $elementOptions) && !empty($elementOptions['placeholder'])) { |
136 | 136 | $placeHolder = '<div id="placeholder-' . $name . '" style="border: 0 none; position: relative; top: 0ex; left: 10px; color: #aaa; height: 0px; overflow: visible;' . |
137 | - (empty($content)?'':'display:none;') . |
|
138 | - '">' . $this->translator->translate($elementOptions['placeholder']) . '</div>'; |
|
137 | + (empty($content)?'':'display:none;') . |
|
138 | + '">' . $this->translator->translate($elementOptions['placeholder']) . '</div>'; |
|
139 | 139 | } |
140 | 140 | return |
141 | 141 | $placeHolder |
@@ -43,7 +43,7 @@ discard block |
||
43 | 43 | * |
44 | 44 | * @var string |
45 | 45 | */ |
46 | - protected $language="de"; |
|
46 | + protected $language = "de"; |
|
47 | 47 | |
48 | 48 | /** |
49 | 49 | * @var |
@@ -57,7 +57,7 @@ discard block |
||
57 | 57 | */ |
58 | 58 | public function render(ElementInterface $element) |
59 | 59 | { |
60 | - $name = $element->getName(); |
|
60 | + $name = $element->getName(); |
|
61 | 61 | if (empty($name) && $name !== 0) { |
62 | 62 | throw new \DomainException( |
63 | 63 | sprintf( |
@@ -78,10 +78,10 @@ discard block |
||
78 | 78 | $headscript->prependFile($basepath('js/jquery.min.js')); |
79 | 79 | |
80 | 80 | $headscript->offsetSetScript( |
81 | - '1000_tinymce_' . $this->getTheme(), |
|
81 | + '1000_tinymce_'.$this->getTheme(), |
|
82 | 82 | ' |
83 | 83 | $(document).ready(function() { |
84 | - tinyMCE.init({' . $this->additionalOptions() . ', |
|
84 | + tinyMCE.init({' . $this->additionalOptions().', |
|
85 | 85 | setup: function(editor) { |
86 | 86 | setPlaceHolder = function(editor, show) { |
87 | 87 | placeHolder = $("#placeholder-" + editor.id); |
@@ -127,15 +127,15 @@ discard block |
||
127 | 127 | } |
128 | 128 | if (is_string($content)) { |
129 | 129 | |
130 | - $class = array_key_exists('class', $attributes)?$attributes['class']:''; |
|
131 | - $class .= (empty($class)?:' ') . ' tinymce_' . $this->getTheme(); |
|
130 | + $class = array_key_exists('class', $attributes) ? $attributes['class'] : ''; |
|
131 | + $class .= (empty($class) ?: ' ').' tinymce_'.$this->getTheme(); |
|
132 | 132 | $attributes['class'] = $class; |
133 | 133 | $placeHolder = ''; |
134 | 134 | $elementOptions = $element->getOptions(); |
135 | 135 | if (array_key_exists('placeholder', $elementOptions) && !empty($elementOptions['placeholder'])) { |
136 | - $placeHolder = '<div id="placeholder-' . $name . '" style="border: 0 none; position: relative; top: 0ex; left: 10px; color: #aaa; height: 0px; overflow: visible;' . |
|
137 | - (empty($content)?'':'display:none;') . |
|
138 | - '">' . $this->translator->translate($elementOptions['placeholder']) . '</div>'; |
|
136 | + $placeHolder = '<div id="placeholder-'.$name.'" style="border: 0 none; position: relative; top: 0ex; left: 10px; color: #aaa; height: 0px; overflow: visible;'. |
|
137 | + (empty($content) ? '' : 'display:none;'). |
|
138 | + '">'.$this->translator->translate($elementOptions['placeholder']).'</div>'; |
|
139 | 139 | } |
140 | 140 | return |
141 | 141 | $placeHolder |
@@ -162,9 +162,9 @@ discard block |
||
162 | 162 | |
163 | 163 | protected function additionalOptions() |
164 | 164 | { |
165 | - $str = json_encode($this->options, ~JSON_HEX_QUOT & ~JSON_FORCE_OBJECT ); |
|
166 | - $str = preg_replace('/"([a-zA-Z_]+[a-zA-Z0-9_]*)":/','$1:',$str); |
|
167 | - return trim($str,'{}'); |
|
165 | + $str = json_encode($this->options, ~JSON_HEX_QUOT & ~JSON_FORCE_OBJECT); |
|
166 | + $str = preg_replace('/"([a-zA-Z_]+[a-zA-Z0-9_]*)":/', '$1:', $str); |
|
167 | + return trim($str, '{}'); |
|
168 | 168 | } |
169 | 169 | |
170 | 170 | /** |
@@ -173,7 +173,7 @@ discard block |
||
173 | 173 | * @param $language |
174 | 174 | */ |
175 | 175 | public function setLanguage($language) { |
176 | - $this->language=$language; |
|
176 | + $this->language = $language; |
|
177 | 177 | } |
178 | 178 | |
179 | 179 | /** |
@@ -182,7 +182,7 @@ discard block |
||
182 | 182 | * @param $languagePath |
183 | 183 | */ |
184 | 184 | public function setLanguagePath($languagePath) { |
185 | - $this->languagePath=$languagePath; |
|
185 | + $this->languagePath = $languagePath; |
|
186 | 186 | } |
187 | 187 | |
188 | 188 | /** |
@@ -191,14 +191,14 @@ discard block |
||
191 | 191 | * @param $name |
192 | 192 | * @param $value |
193 | 193 | */ |
194 | - public function setOption($name,$value){ |
|
194 | + public function setOption($name, $value) { |
|
195 | 195 | if (array_key_exists($name, $this->options)) { |
196 | 196 | $this->options[$name] = $value; |
197 | - }elseif ('language' == $name or 'language_url' == $name ) { |
|
197 | + }elseif ('language' == $name or 'language_url' == $name) { |
|
198 | 198 | $this->options[$name] = $value; |
199 | 199 | |
200 | - }else{ |
|
201 | - throw new \InvalidArgumentException('Unknown Option ' . $name . ' in ' . __FILE__ . ' Line ' . __LINE__ ); |
|
200 | + } else { |
|
201 | + throw new \InvalidArgumentException('Unknown Option '.$name.' in '.__FILE__.' Line '.__LINE__); |
|
202 | 202 | } |
203 | 203 | } |
204 | 204 | |
@@ -209,7 +209,7 @@ discard block |
||
209 | 209 | */ |
210 | 210 | public function setOptions($options) |
211 | 211 | { |
212 | - foreach($options as $key => $val) { |
|
212 | + foreach ($options as $key => $val) { |
|
213 | 213 | $this->setOption($key, $val); |
214 | 214 | } |
215 | 215 | } |
@@ -19,5 +19,5 @@ |
||
19 | 19 | { |
20 | 20 | protected $theme = 'light'; |
21 | 21 | |
22 | - protected $languagePath="/js/tinymce-lang/"; |
|
22 | + protected $languagePath = "/js/tinymce-lang/"; |
|
23 | 23 | } |
@@ -70,7 +70,7 @@ discard block |
||
70 | 70 | /** |
71 | 71 | * Sets the converter |
72 | 72 | * |
73 | - * @param $converter |
|
73 | + * @param Converter $converter |
|
74 | 74 | * |
75 | 75 | * @return $this |
76 | 76 | */ |
@@ -155,7 +155,7 @@ discard block |
||
155 | 155 | /** |
156 | 156 | * Gets the data of an element |
157 | 157 | * |
158 | - * @return mixed |
|
158 | + * @return Hidden |
|
159 | 159 | */ |
160 | 160 | public function getDataElement() |
161 | 161 | { |
@@ -165,7 +165,7 @@ discard block |
||
165 | 165 | /** |
166 | 166 | * Gets the name of an element |
167 | 167 | * |
168 | - * @return mixed |
|
168 | + * @return Text |
|
169 | 169 | */ |
170 | 170 | public function getNameElement() |
171 | 171 | { |
@@ -144,12 +144,12 @@ discard block |
||
144 | 144 | $id = str_replace(array('[', ']'), array('-', ''), $name); |
145 | 145 | $this->setAttribute('id', $id); |
146 | 146 | $this->nameElement->setName($name . '[name]') |
147 | - ->setAttribute('id', $id . '-name') |
|
148 | - ->setAttribute('class', 'form-control geolocation'); |
|
147 | + ->setAttribute('id', $id . '-name') |
|
148 | + ->setAttribute('class', 'form-control geolocation'); |
|
149 | 149 | $this->dataElement->setName($name . '[data]') |
150 | - ->setAttribute('id', $id . '-data'); |
|
150 | + ->setAttribute('id', $id . '-data'); |
|
151 | 151 | $this->typeElement->setName($name . '[type]') |
152 | - ->setAttribute('id', $id . '-type'); |
|
152 | + ->setAttribute('id', $id . '-type'); |
|
153 | 153 | } |
154 | 154 | |
155 | 155 | /** |
@@ -215,8 +215,8 @@ discard block |
||
215 | 215 | $lon = $lat = 0; |
216 | 216 | |
217 | 217 | foreach($lonLat as $k=>$v) { |
218 | - list($lon,$lat) = explode(',', $v, 2); |
|
219 | - $latLon[]=$lat.','.$lon; |
|
218 | + list($lon,$lat) = explode(',', $v, 2); |
|
219 | + $latLon[]=$lat.','.$lon; |
|
220 | 220 | } |
221 | 221 | |
222 | 222 | $value['data'] = [ |
@@ -143,13 +143,13 @@ discard block |
||
143 | 143 | $name = $this->getName(); |
144 | 144 | $id = str_replace(array('[', ']'), array('-', ''), $name); |
145 | 145 | $this->setAttribute('id', $id); |
146 | - $this->nameElement->setName($name . '[name]') |
|
147 | - ->setAttribute('id', $id . '-name') |
|
146 | + $this->nameElement->setName($name.'[name]') |
|
147 | + ->setAttribute('id', $id.'-name') |
|
148 | 148 | ->setAttribute('class', 'form-control geolocation'); |
149 | - $this->dataElement->setName($name . '[data]') |
|
150 | - ->setAttribute('id', $id . '-data'); |
|
151 | - $this->typeElement->setName($name . '[type]') |
|
152 | - ->setAttribute('id', $id . '-type'); |
|
149 | + $this->dataElement->setName($name.'[data]') |
|
150 | + ->setAttribute('id', $id.'-data'); |
|
151 | + $this->typeElement->setName($name.'[type]') |
|
152 | + ->setAttribute('id', $id.'-type'); |
|
153 | 153 | } |
154 | 154 | |
155 | 155 | /** |
@@ -204,7 +204,7 @@ discard block |
||
204 | 204 | * |
205 | 205 | * @return $this |
206 | 206 | */ |
207 | - public function setValue($value, $type=null) |
|
207 | + public function setValue($value, $type = null) |
|
208 | 208 | { |
209 | 209 | if ($value instanceOf Location) { |
210 | 210 | $value = $this->getConverter()->toValue($value, $type ?: $this->typeElement->getValue()); |
@@ -214,9 +214,9 @@ discard block |
||
214 | 214 | |
215 | 215 | $lon = $lat = 0; |
216 | 216 | |
217 | - foreach($lonLat as $k=>$v) { |
|
218 | - list($lon,$lat) = explode(',', $v, 2); |
|
219 | - $latLon[]=$lat.','.$lon; |
|
217 | + foreach ($lonLat as $k=>$v) { |
|
218 | + list($lon, $lat) = explode(',', $v, 2); |
|
219 | + $latLon[] = $lat.','.$lon; |
|
220 | 220 | } |
221 | 221 | |
222 | 222 | $value['data'] = [ |
@@ -225,8 +225,8 @@ discard block |
||
225 | 225 | (float) $lon |
226 | 226 | ], |
227 | 227 | 'type'=>'Point', |
228 | - 'city' => substr($value['name'],0,strrpos($value['name'], ',' )), |
|
229 | - 'region' => substr($value['name'],strrpos($value['name'], ',' )+2), |
|
228 | + 'city' => substr($value['name'], 0, strrpos($value['name'], ',')), |
|
229 | + 'region' => substr($value['name'], strrpos($value['name'], ',') + 2), |
|
230 | 230 | 'postalcode' =>'', |
231 | 231 | 'country' => 'DE']; |
232 | 232 | } |