Completed
Pull Request — develop (#329)
by Carsten
07:08
created
module/Core/src/Core/Controller/AdminControllerEvent.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -34,7 +34,7 @@
 block discarded – undo
34 34
         $this->models = new PriorityList();
35 35
     }
36 36
 
37
-    public function addViewModel($name, $model, $priority=0)
37
+    public function addViewModel($name, $model, $priority = 0)
38 38
     {
39 39
         $this->models->insert($name, $model, $priority);
40 40
 
Please login to merge, or discard this patch.
module/Jobs/config/router.config.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -11,7 +11,7 @@
 block discarded – undo
11 11
 
12 12
 // Routes
13 13
 return array('router' => array('routes' => array('lang' => array('child_routes' => array(
14
-    'admin' => [ 'child_routes' => [
14
+    'admin' => ['child_routes' => [
15 15
         'jobs' => [
16 16
             'type' => 'Segment',
17 17
             'options' => [
Please login to merge, or discard this patch.
module/Jobs/src/Jobs/Form/Element/StatusSelect.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -36,7 +36,7 @@  discard block
 block discarded – undo
36 36
         if (true === $this->getOption('include_all_option')) {
37 37
             $valueOptions = array_merge([
38 38
                                             'all' => /*@translate*/ 'All',
39
-                                         ], $valueOptions );
39
+                                         ], $valueOptions);
40 40
         }
41 41
 
42 42
         $this->setValueOptions($valueOptions);
@@ -82,7 +82,7 @@  discard block
 block discarded – undo
82 82
         $options = parent::getValueOptions();
83 83
 
84 84
         return true === $this->getOption('include_all_option')
85
-               ? array_merge([ 'all' => /*@translate*/ 'All' ], $options)
85
+               ? array_merge(['all' => /*@translate*/ 'All'], $options)
86 86
                : $options;
87 87
     }
88 88
 
Please login to merge, or discard this patch.
module/Jobs/src/Jobs/Listener/Events/JobEvent.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -34,13 +34,13 @@  discard block
 block discarded – undo
34 34
      * Event is fired when a users has created a new job opening and accepted the
35 35
      * terms and conditions
36 36
      */
37
-    const EVENT_JOB_CREATED   = 'job.created';
37
+    const EVENT_JOB_CREATED = 'job.created';
38 38
 
39 39
     /**
40 40
      * Event is fired when the owner of the YAWIK installation has accepted the job
41 41
      * opening
42 42
      */
43
-    const EVENT_JOB_ACCEPTED   = 'job.accepted';
43
+    const EVENT_JOB_ACCEPTED = 'job.accepted';
44 44
 
45 45
     /**
46 46
      * Event is fired, when the owner of the YAWIK installation has rejected the job
@@ -54,7 +54,7 @@  discard block
 block discarded – undo
54 54
     /**
55 55
      * get all available names for publishing
56 56
      */
57
-    const PORTAL_AVAIL_NAME    = 'portal.availname';
57
+    const PORTAL_AVAIL_NAME = 'portal.availname';
58 58
 
59 59
     /**
60 60
      * @var portals to be published
Please login to merge, or discard this patch.
module/Jobs/src/Jobs/Listener/AdminWidgetProvider.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -39,15 +39,15 @@
 block discarded – undo
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
                                      ],
Please login to merge, or discard this patch.
config/config.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -12,7 +12,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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;
Please login to merge, or discard this patch.
module/Geo/config/module.config.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -22,7 +22,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 
Please login to merge, or discard this patch.
module/Geo/src/Geo/Form/GeoText.php 1 patch
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -143,13 +143,13 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
         }
Please login to merge, or discard this patch.
module/Geo/src/Geo/Form/GeoText/Converter.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -71,8 +71,8 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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);
Please login to merge, or discard this patch.