@@ -39,15 +39,15 @@ |
||
39 | 39 | 'title' => 'Jobs', |
40 | 40 | 'data' => [ |
41 | 41 | /*@translate*/ 'Total jobs' => [ |
42 | - 'url' => [ 'lang/admin/jobs', [], true ], |
|
42 | + 'url' => ['lang/admin/jobs', [], true], |
|
43 | 43 | 'value' => $total, |
44 | 44 | ], |
45 | 45 | /*@translate*/ 'Active jobs' => [ |
46 | - 'url' => [ 'lang/admin/jobs', [], ['query' => [ 'status' => 'active' ]], true ], |
|
46 | + 'url' => ['lang/admin/jobs', [], ['query' => ['status' => 'active']], true], |
|
47 | 47 | 'value' => $active |
48 | 48 | ], |
49 | 49 | /*@translate*/ 'Pending jobs' => [ |
50 | - 'url' => [ 'lang/admin/jobs', [], ['query' => [ 'status' => 'created' ]], true ], |
|
50 | + 'url' => ['lang/admin/jobs', [], ['query' => ['status' => 'created']], true], |
|
51 | 51 | 'value' => $pending |
52 | 52 | ] |
53 | 53 | ], |
@@ -12,7 +12,7 @@ discard block |
||
12 | 12 | |
13 | 13 | $env = getenv('APPLICATION_ENV') ?: 'production'; |
14 | 14 | |
15 | -if (!file_exists(__DIR__ . '/autoload/yawik.config.global.php')) { |
|
15 | +if (!file_exists(__DIR__.'/autoload/yawik.config.global.php')) { |
|
16 | 16 | $modules = array('Install'); |
17 | 17 | } else { |
18 | 18 | $modules = array( |
@@ -34,12 +34,12 @@ discard block |
||
34 | 34 | // kann und über Server-Variablen oder ähnlichen steuern kann |
35 | 35 | $allModules = False; |
36 | 36 | } |
37 | - foreach (glob(__DIR__ . '/autoload/*.module.php') as $moduleFile) { |
|
37 | + foreach (glob(__DIR__.'/autoload/*.module.php') as $moduleFile) { |
|
38 | 38 | $addModules = require $moduleFile; |
39 | 39 | foreach ($addModules as $addModule) { |
40 | 40 | if (strpos($addModule, '-') === 0) { |
41 | - $remove = substr($addModule,1); |
|
42 | - $modules = array_filter($modules, function ($elem) use ($remove) { return strcasecmp($elem,$remove); }); |
|
41 | + $remove = substr($addModule, 1); |
|
42 | + $modules = array_filter($modules, function($elem) use ($remove) { return strcasecmp($elem, $remove); }); |
|
43 | 43 | } |
44 | 44 | else { |
45 | 45 | if (!in_array($addModule, $modules)) { |
@@ -92,7 +92,7 @@ discard block |
||
92 | 92 | ), |
93 | 93 | ); |
94 | 94 | |
95 | -$envConfigFile = __DIR__ . '/config.' . $env . '.php'; |
|
95 | +$envConfigFile = __DIR__.'/config.'.$env.'.php'; |
|
96 | 96 | if (file_exists($envConfigFile)) { |
97 | 97 | if (is_readable($envConfigFile)) { |
98 | 98 | $envConfig = include $envConfigFile; |
@@ -28,7 +28,7 @@ discard block |
||
28 | 28 | */ |
29 | 29 | public function getConfig() |
30 | 30 | { |
31 | - return include __DIR__ . '/config/module.config.php'; |
|
31 | + return include __DIR__.'/config/module.config.php'; |
|
32 | 32 | } |
33 | 33 | |
34 | 34 | /** |
@@ -42,7 +42,7 @@ discard block |
||
42 | 42 | return array( |
43 | 43 | 'Zend\Loader\StandardAutoloader' => array( |
44 | 44 | 'namespaces' => array( |
45 | - __NAMESPACE__ => __DIR__ . '/src/' . __NAMESPACE__, |
|
45 | + __NAMESPACE__ => __DIR__.'/src/'.__NAMESPACE__, |
|
46 | 46 | ), |
47 | 47 | ), |
48 | 48 | ); |
@@ -22,7 +22,7 @@ discard block |
||
22 | 22 | * for multiple paths. |
23 | 23 | * example https://github.com/doctrine/DoctrineORMModule |
24 | 24 | */ |
25 | - 'paths' => array( __DIR__ . '/../src/Geo/Entity'), |
|
25 | + 'paths' => array(__DIR__.'/../src/Geo/Entity'), |
|
26 | 26 | ), |
27 | 27 | ), |
28 | 28 | 'eventmanager' => array( |
@@ -84,13 +84,13 @@ discard block |
||
84 | 84 | |
85 | 85 | // Map template to files. Speeds up the lookup through the template stack. |
86 | 86 | 'template_map' => array( |
87 | - 'geo/form/GeoText' => __DIR__ . '/../view/form/geotext.phtml', |
|
88 | - 'geo/form/GeoHorizontal' => __DIR__ . '/../view/form/geo-horizontal.phtml', |
|
87 | + 'geo/form/GeoText' => __DIR__.'/../view/form/geotext.phtml', |
|
88 | + 'geo/form/GeoHorizontal' => __DIR__.'/../view/form/geo-horizontal.phtml', |
|
89 | 89 | ), |
90 | 90 | |
91 | 91 | // Where to look for view templates not mapped above |
92 | 92 | 'template_path_stack' => array( |
93 | - __DIR__ . '/../view', |
|
93 | + __DIR__.'/../view', |
|
94 | 94 | ), |
95 | 95 | ), |
96 | 96 |
@@ -71,8 +71,8 @@ discard block |
||
71 | 71 | $coordinates = $location->getCoordinates(); |
72 | 72 | $data = [ |
73 | 73 | "geometry" => [ |
74 | - "coordinates" => $coordinates?$coordinates->getCoordinates():[0,0], |
|
75 | - "type" => $coordinates?$coordinates->getType():'Point' |
|
74 | + "coordinates" => $coordinates ? $coordinates->getCoordinates() : [0, 0], |
|
75 | + "type" => $coordinates ? $coordinates->getType() : 'Point' |
|
76 | 76 | ], |
77 | 77 | "type" => "Feature", |
78 | 78 | "properties" => [ |
@@ -82,9 +82,9 @@ discard block |
||
82 | 82 | "postcode" => $location->getPostalcode() |
83 | 83 | ] |
84 | 84 | ]; |
85 | - return $location->getCity() . '|' . Json::encode($data); |
|
85 | + return $location->getCity().'|'.Json::encode($data); |
|
86 | 86 | } else { |
87 | - return $location->getCity() . ', ' . $location->getRegion(); |
|
87 | + return $location->getCity().', '.$location->getRegion(); |
|
88 | 88 | } |
89 | 89 | } |
90 | 90 | |
@@ -98,7 +98,7 @@ discard block |
||
98 | 98 | public function toCoordinates($input) { |
99 | 99 | $client = new Client('http://api.cross-solution.de/geo'); |
100 | 100 | $client->setMethod('GET'); |
101 | - $client->setParameterGet(array('q' => $input, 'country' => 'DE', 'coor' => 1, 'zoom' => 1 , 'strict' => 0)); |
|
101 | + $client->setParameterGet(array('q' => $input, 'country' => 'DE', 'coor' => 1, 'zoom' => 1, 'strict' => 0)); |
|
102 | 102 | $response = $client->send(); |
103 | 103 | $result = $response->getBody(); |
104 | 104 | $result = json_decode($result); |
@@ -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 | } |
@@ -37,7 +37,7 @@ discard block |
||
37 | 37 | */ |
38 | 38 | public function getConfig() |
39 | 39 | { |
40 | - return ModuleConfigLoader::load(__DIR__ . '/config'); |
|
40 | + return ModuleConfigLoader::load(__DIR__.'/config'); |
|
41 | 41 | } |
42 | 42 | |
43 | 43 | /** |
@@ -50,7 +50,7 @@ discard block |
||
50 | 50 | return array( |
51 | 51 | 'Zend\Loader\StandardAutoloader' => array( |
52 | 52 | 'namespaces' => array( |
53 | - __NAMESPACE__ => __DIR__ . '/src/' . __NAMESPACE__, |
|
53 | + __NAMESPACE__ => __DIR__.'/src/'.__NAMESPACE__, |
|
54 | 54 | ), |
55 | 55 | ), |
56 | 56 | ); |
@@ -35,7 +35,7 @@ discard block |
||
35 | 35 | * @var String |
36 | 36 | * @ODM\Field(type="string") |
37 | 37 | */ |
38 | - protected $qualifications=''; |
|
38 | + protected $qualifications = ''; |
|
39 | 39 | |
40 | 40 | /** |
41 | 41 | * Requirements field of the job template |
@@ -43,7 +43,7 @@ discard block |
||
43 | 43 | * @var String |
44 | 44 | * @ODM\Field(type="string") |
45 | 45 | */ |
46 | - protected $requirements=''; |
|
46 | + protected $requirements = ''; |
|
47 | 47 | |
48 | 48 | /** |
49 | 49 | * Benefits field of the job template |
@@ -51,7 +51,7 @@ discard block |
||
51 | 51 | * @var String |
52 | 52 | * @ODM\Field(type="string") |
53 | 53 | */ |
54 | - protected $benefits=''; |
|
54 | + protected $benefits = ''; |
|
55 | 55 | |
56 | 56 | /** |
57 | 57 | * Job title field of the job template |
@@ -59,7 +59,7 @@ discard block |
||
59 | 59 | * @var String |
60 | 60 | * @ODM\Field(type="string") |
61 | 61 | */ |
62 | - protected $title=''; |
|
62 | + protected $title = ''; |
|
63 | 63 | |
64 | 64 | /** |
65 | 65 | * Company description field of the job template |
@@ -67,7 +67,7 @@ discard block |
||
67 | 67 | * @var String |
68 | 68 | * @ODM\Field(type="string") |
69 | 69 | */ |
70 | - protected $description=''; |
|
70 | + protected $description = ''; |
|
71 | 71 | |
72 | 72 | /** |
73 | 73 | * language of the job template values. Must be a valid ISO 639-1 code |
@@ -75,7 +75,7 @@ discard block |
||
75 | 75 | * @var String |
76 | 76 | * @ODM\Field(type="string") |
77 | 77 | */ |
78 | - protected $language='en'; |
|
78 | + protected $language = 'en'; |
|
79 | 79 | |
80 | 80 | /** |
81 | 81 | * free values (currently not in use) |
@@ -92,7 +92,7 @@ discard block |
||
92 | 92 | */ |
93 | 93 | public function setQualifications($qualifications) |
94 | 94 | { |
95 | - $this->qualifications= (string) $qualifications; |
|
95 | + $this->qualifications = (string) $qualifications; |
|
96 | 96 | return $this; |
97 | 97 | } |
98 | 98 | |
@@ -114,7 +114,7 @@ discard block |
||
114 | 114 | */ |
115 | 115 | public function setRequirements($requirements) |
116 | 116 | { |
117 | - $this->requirements=(string) $requirements; |
|
117 | + $this->requirements = (string) $requirements; |
|
118 | 118 | return $this; |
119 | 119 | } |
120 | 120 | |
@@ -136,7 +136,7 @@ discard block |
||
136 | 136 | */ |
137 | 137 | public function setBenefits($benefits) |
138 | 138 | { |
139 | - $this->benefits=(string) $benefits; |
|
139 | + $this->benefits = (string) $benefits; |
|
140 | 140 | return $this; |
141 | 141 | } |
142 | 142 | |
@@ -158,7 +158,7 @@ discard block |
||
158 | 158 | */ |
159 | 159 | public function setTitle($title) |
160 | 160 | { |
161 | - $this->title=(string) $title; |
|
161 | + $this->title = (string) $title; |
|
162 | 162 | return $this; |
163 | 163 | } |
164 | 164 | |
@@ -180,7 +180,7 @@ discard block |
||
180 | 180 | */ |
181 | 181 | public function setDescription($description) |
182 | 182 | { |
183 | - $this->description=(string) $description; |
|
183 | + $this->description = (string) $description; |
|
184 | 184 | return $this; |
185 | 185 | } |
186 | 186 | |
@@ -202,7 +202,7 @@ discard block |
||
202 | 202 | */ |
203 | 203 | public function setLanguage($language) |
204 | 204 | { |
205 | - $this->language=(string) $language; |
|
205 | + $this->language = (string) $language; |
|
206 | 206 | return $this; |
207 | 207 | } |
208 | 208 | |
@@ -247,7 +247,7 @@ discard block |
||
247 | 247 | |
248 | 248 | public function __get($property) |
249 | 249 | { |
250 | - $getter = "get" . ucfirst($property); |
|
250 | + $getter = "get".ucfirst($property); |
|
251 | 251 | if (method_exists($this, $getter)) { |
252 | 252 | return $this->$getter(); |
253 | 253 | } |
@@ -262,7 +262,7 @@ discard block |
||
262 | 262 | public function __set($property, $value) |
263 | 263 | { |
264 | 264 | //$this->checkWriteAccess(); |
265 | - $setter = 'set' . ucfirst($property); |
|
265 | + $setter = 'set'.ucfirst($property); |
|
266 | 266 | if (method_exists($this, $setter)) { |
267 | 267 | $this->$setter($value); |
268 | 268 | return; |
@@ -480,7 +480,7 @@ discard block |
||
480 | 480 | if ($removePermissions) { |
481 | 481 | $this->getPermissions()->revoke($this->user, Permissions::PERMISSION_ALL); |
482 | 482 | } |
483 | - $this->user=null; |
|
483 | + $this->user = null; |
|
484 | 484 | } |
485 | 485 | |
486 | 486 | return $this; |
@@ -705,7 +705,7 @@ discard block |
||
705 | 705 | $organization = $this->organization; |
706 | 706 | if (isset($organization) && isset($organization->image)) { |
707 | 707 | $organizationImage = $organization->image; |
708 | - return "/file/Organizations.OrganizationImage/" . $organizationImage->id; |
|
708 | + return "/file/Organizations.OrganizationImage/".$organizationImage->id; |
|
709 | 709 | } |
710 | 710 | return $this->logoRef; |
711 | 711 | } |