@@ -60,6 +60,6 @@ |
||
60 | 60 | $services = $application->getServiceManager(); |
61 | 61 | |
62 | 62 | $services->get('Install/Listener/LanguageSetter') |
63 | - ->attach($eventManager); |
|
63 | + ->attach($eventManager); |
|
64 | 64 | } |
65 | 65 | } |
@@ -24,23 +24,23 @@ |
||
24 | 24 | |
25 | 25 | public function getConfig() |
26 | 26 | { |
27 | - return include __DIR__ . '/config/module.config.php'; |
|
27 | + return include __DIR__.'/config/module.config.php'; |
|
28 | 28 | } |
29 | 29 | |
30 | 30 | public function getAutoloaderConfig() |
31 | 31 | { |
32 | 32 | return array( |
33 | 33 | 'Zend\Loader\ClassMapAutoloader' => [ |
34 | - __DIR__ . '/src/autoload_classmap.php', |
|
34 | + __DIR__.'/src/autoload_classmap.php', |
|
35 | 35 | [ |
36 | 36 | // We need this filter for initial user creation. |
37 | - 'Auth\Entity\Filter\CredentialFilter' => __DIR__ . '/../Auth/src/Auth/Entity/Filter/CredentialFilter.php', |
|
37 | + 'Auth\Entity\Filter\CredentialFilter' => __DIR__.'/../Auth/src/Auth/Entity/Filter/CredentialFilter.php', |
|
38 | 38 | ], |
39 | 39 | ], |
40 | 40 | 'Zend\Loader\StandardAutoloader' => array( |
41 | 41 | 'namespaces' => array( |
42 | - __NAMESPACE__ => __DIR__ . '/src' /* . __NAMESPACE__*/, |
|
43 | - __NAMESPACE__ . 'Test' => __DIR__ . '/test/' . __NAMESPACE__ . 'Test', |
|
42 | + __NAMESPACE__ => __DIR__.'/src' /* . __NAMESPACE__*/, |
|
43 | + __NAMESPACE__.'Test' => __DIR__.'/test/'.__NAMESPACE__.'Test', |
|
44 | 44 | ), |
45 | 45 | ), |
46 | 46 | ); |
@@ -14,10 +14,10 @@ |
||
14 | 14 | protected $validator; |
15 | 15 | |
16 | 16 | /** |
17 | - * Get a validator if none has been set. |
|
18 | - * https://github.com/posabsolute/jQuery-Validation-Engine/issues/265 |
|
19 | - * @return RegexValidator |
|
20 | - */ |
|
17 | + * Get a validator if none has been set. |
|
18 | + * https://github.com/posabsolute/jQuery-Validation-Engine/issues/265 |
|
19 | + * @return RegexValidator |
|
20 | + */ |
|
21 | 21 | public function getValidator() |
22 | 22 | { |
23 | 23 | if (null === $this->validator) { |
@@ -17,7 +17,7 @@ |
||
17 | 17 | /** |
18 | 18 | * @param string $par Query Parameter |
19 | 19 | * @param string $geoCoderUrl Url of the geo location service |
20 | - * @param string $land language |
|
20 | + * @param string $lang language |
|
21 | 21 | * |
22 | 22 | * @return array|mixed|string |
23 | 23 | */ |
@@ -51,16 +51,16 @@ |
||
51 | 51 | $r=[]; |
52 | 52 | foreach ($result as $key => $val) { |
53 | 53 | $row=['name' => (property_exists($val->properties, 'name') ? $val->properties->name:''), |
54 | - 'postcode' => (property_exists($val->properties, 'postcode') ? $val->properties->postcode:''), |
|
55 | - 'city' =>(property_exists($val->properties, 'city') ? $val->properties->city:''), |
|
56 | - 'street' => (property_exists($val->properties, 'street') ? $val->properties->street : ''), |
|
57 | - 'state' => (property_exists($val->properties, 'state') ? $val->properties->state : ''), |
|
58 | - 'country' => (property_exists($val->properties, 'country') ? $val->properties->country : ''), |
|
59 | - 'coordinates' => implode(":", $val->geometry->coordinates), |
|
60 | - 'osm_key' => (property_exists($val->properties, 'osm_key') ? $val->properties->osm_key : ''), |
|
61 | - 'osm_value' => (property_exists($val->properties, 'osm_value') ? $val->properties->osm_value : ''), |
|
62 | - 'osm_id' => (property_exists($val->properties, 'osm_id') ? $val->properties->osm_id : ''), |
|
63 | - 'data' => json_encode($val), |
|
54 | + 'postcode' => (property_exists($val->properties, 'postcode') ? $val->properties->postcode:''), |
|
55 | + 'city' =>(property_exists($val->properties, 'city') ? $val->properties->city:''), |
|
56 | + 'street' => (property_exists($val->properties, 'street') ? $val->properties->street : ''), |
|
57 | + 'state' => (property_exists($val->properties, 'state') ? $val->properties->state : ''), |
|
58 | + 'country' => (property_exists($val->properties, 'country') ? $val->properties->country : ''), |
|
59 | + 'coordinates' => implode(":", $val->geometry->coordinates), |
|
60 | + 'osm_key' => (property_exists($val->properties, 'osm_key') ? $val->properties->osm_key : ''), |
|
61 | + 'osm_value' => (property_exists($val->properties, 'osm_value') ? $val->properties->osm_value : ''), |
|
62 | + 'osm_id' => (property_exists($val->properties, 'osm_id') ? $val->properties->osm_id : ''), |
|
63 | + 'data' => json_encode($val), |
|
64 | 64 | ]; |
65 | 65 | $r[]=$row; |
66 | 66 | } |
@@ -27,11 +27,11 @@ discard block |
||
27 | 27 | $client->setMethod('GET'); |
28 | 28 | |
29 | 29 | $osmTags = [ |
30 | - 'tourism','aeroway','railway', 'amenity', 'historic', 'tunnel', 'mountain_pass', |
|
30 | + 'tourism', 'aeroway', 'railway', 'amenity', 'historic', 'tunnel', 'mountain_pass', |
|
31 | 31 | 'leisure', 'natural', 'bridge', 'waterway' |
32 | 32 | ]; |
33 | 33 | |
34 | - $osmTags = array_map(function($i) { return urlencode('!' . $i); }, $osmTags); |
|
34 | + $osmTags = array_map(function($i) { return urlencode('!'.$i); }, $osmTags); |
|
35 | 35 | |
36 | 36 | $uri = sprintf( |
37 | 37 | '%s?q=%s&lang=%s&osm_tag=%s', |
@@ -48,11 +48,11 @@ discard block |
||
48 | 48 | $result = $response->getBody(); |
49 | 49 | $result = json_decode($result); |
50 | 50 | $result = $result->features; |
51 | - $r=[]; |
|
51 | + $r = []; |
|
52 | 52 | foreach ($result as $key => $val) { |
53 | - $row=['name' => (property_exists($val->properties, 'name') ? $val->properties->name:''), |
|
54 | - 'postcode' => (property_exists($val->properties, 'postcode') ? $val->properties->postcode:''), |
|
55 | - 'city' =>(property_exists($val->properties, 'city') ? $val->properties->city:''), |
|
53 | + $row = ['name' => (property_exists($val->properties, 'name') ? $val->properties->name : ''), |
|
54 | + 'postcode' => (property_exists($val->properties, 'postcode') ? $val->properties->postcode : ''), |
|
55 | + 'city' =>(property_exists($val->properties, 'city') ? $val->properties->city : ''), |
|
56 | 56 | 'street' => (property_exists($val->properties, 'street') ? $val->properties->street : ''), |
57 | 57 | 'state' => (property_exists($val->properties, 'state') ? $val->properties->state : ''), |
58 | 58 | 'country' => (property_exists($val->properties, 'country') ? $val->properties->country : ''), |
@@ -62,7 +62,7 @@ discard block |
||
62 | 62 | 'osm_id' => (property_exists($val->properties, 'osm_id') ? $val->properties->osm_id : ''), |
63 | 63 | 'data' => json_encode($val), |
64 | 64 | ]; |
65 | - $r[]=$row; |
|
65 | + $r[] = $row; |
|
66 | 66 | } |
67 | 67 | return $r; |
68 | 68 | } |
@@ -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 | { |
@@ -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 |
@@ -81,7 +81,7 @@ |
||
81 | 81 | |
82 | 82 | $adapter->setParams($params); |
83 | 83 | $paginator->setCurrentPageNumber($params->get('page', 1)) |
84 | - ->setItemCountPerPage($params->get('count', 10)); |
|
84 | + ->setItemCountPerPage($params->get('count', 10)); |
|
85 | 85 | |
86 | 86 | return $paginator; |
87 | 87 | } |
@@ -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 | } |
@@ -24,8 +24,8 @@ |
||
24 | 24 | * @author Mathias Gelhausen <[email protected]> |
25 | 25 | */ |
26 | 26 | class Form extends ZendForm implements DescriptionAwareFormInterface, |
27 | - DisableElementsCapableInterface, |
|
28 | - FormParentInterface |
|
27 | + DisableElementsCapableInterface, |
|
28 | + FormParentInterface |
|
29 | 29 | { |
30 | 30 | |
31 | 31 | use EventManagerAwareTrait, HydratorStrategyAwareTrait; |
@@ -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 |
@@ -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('/assets/jquery/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 | } |