@@ -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; |
@@ -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 | } |
@@ -63,10 +63,10 @@ |
||
63 | 63 | $image = $org->getImage(); |
64 | 64 | $imageUrl = $image ? $image->getUri() : ''; |
65 | 65 | |
66 | - $options[$org->getId()] = $name . '|' |
|
67 | - . $contact->getCity() . '|' |
|
68 | - . $contact->getStreet() . '|' |
|
69 | - . $contact->getHouseNumber() . '|' |
|
66 | + $options[$org->getId()] = $name.'|' |
|
67 | + . $contact->getCity().'|' |
|
68 | + . $contact->getStreet().'|' |
|
69 | + . $contact->getHouseNumber().'|' |
|
70 | 70 | . $imageUrl; |
71 | 71 | } |
72 | 72 |
@@ -35,7 +35,7 @@ |
||
35 | 35 | |
36 | 36 | public function render(ElementInterface $element, $options = null) |
37 | 37 | { |
38 | - $content = '<iframe src="' . $element->getValue() . '" name="preview" style="width:100%; height:800px;"></iframe>'; |
|
38 | + $content = '<iframe src="'.$element->getValue().'" name="preview" style="width:100%; height:800px;"></iframe>'; |
|
39 | 39 | return $content; |
40 | 40 | } |
41 | 41 | } |
@@ -56,7 +56,7 @@ discard block |
||
56 | 56 | { |
57 | 57 | return $this->findBy( |
58 | 58 | array( |
59 | - 'permissions.assigned.' . $resourceId => array( |
|
59 | + 'permissions.assigned.'.$resourceId => array( |
|
60 | 60 | '$exists' => true |
61 | 61 | ) |
62 | 62 | ) |
@@ -77,7 +77,7 @@ discard block |
||
77 | 77 | $qb->hydrate(false) |
78 | 78 | ->select('title', 'applyId') |
79 | 79 | ->field('permissions.view')->equals($userId) |
80 | - ->field('title')->equals(new \MongoRegex('/' . $query . '/i')) |
|
80 | + ->field('title')->equals(new \MongoRegex('/'.$query.'/i')) |
|
81 | 81 | ->sort('title') |
82 | 82 | ->limit(5); |
83 | 83 | |
@@ -144,7 +144,7 @@ discard block |
||
144 | 144 | $qb = $this->createQueryBuilder(); |
145 | 145 | $qb->distinct('organization') |
146 | 146 | ->hydrate(true) |
147 | - ->field('status.name')->notIn([ StatusInterface::EXPIRED, StatusInterface::INACTIVE ]); |
|
147 | + ->field('status.name')->notIn([StatusInterface::EXPIRED, StatusInterface::INACTIVE]); |
|
148 | 148 | $q = $qb->getQuery(); |
149 | 149 | $r = $q->execute(); |
150 | 150 | $r = $r->toArray(); |
@@ -171,14 +171,14 @@ |
||
171 | 171 | $jsonLastError = json_last_error(); |
172 | 172 | if (json_last_error() != JSON_ERROR_NONE) { |
173 | 173 | // not able to decode json |
174 | - $log->info('RestCall Response not Json [errorCode: ' . $jsonLastError . ']: ' . var_export($body, true)); |
|
174 | + $log->info('RestCall Response not Json [errorCode: '.$jsonLastError.']: '.var_export($body, true)); |
|
175 | 175 | } else { |
176 | 176 | // does the provider want to have an own ID for Identification ? |
177 | 177 | $response_referenceUpdate = $decodedBody->referenceUpdate; |
178 | 178 | $response_externalIdUpdate = $decodedBody->applyIdUpdate; |
179 | 179 | |
180 | 180 | if ($publisher->externalId != $response_externalIdUpdate || $publisher->reference != $response_referenceUpdate) { |
181 | - $log->info('RestCall changed externalID [' . var_export($publisher->externalId, true) . ' => ' . var_export($response_externalIdUpdate, true) . '], reference [' . var_export($publisher->reference, true) . ' => ' . var_export($response_referenceUpdate, true) . ']'); |
|
181 | + $log->info('RestCall changed externalID ['.var_export($publisher->externalId, true).' => '.var_export($response_externalIdUpdate, true).'], reference ['.var_export($publisher->reference, true).' => '.var_export($response_referenceUpdate, true).']'); |
|
182 | 182 | $publisher->reference = $response_referenceUpdate; |
183 | 183 | $publisher->externalId = $response_externalIdUpdate; |
184 | 184 | $serviceManager->get('repositories')->store($entity); |
@@ -62,7 +62,7 @@ |
||
62 | 62 | $job = $this->repository->find($id); |
63 | 63 | |
64 | 64 | if (!$job) { |
65 | - throw new \RuntimeException('No job found with id "' . $id . '"'); |
|
65 | + throw new \RuntimeException('No job found with id "'.$id.'"'); |
|
66 | 66 | } |
67 | 67 | |
68 | 68 | $this->acl($job, 'edit'); |