Completed
Pull Request — develop (#450)
by ANTHONIUS
06:55
created
module/Core/src/Core/Form/View/Helper/FormEditor.php 1 patch
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -44,7 +44,7 @@  discard block
 block discarded – undo
44 44
      *
45 45
      * @var string
46 46
      */
47
-    protected $language="de";
47
+    protected $language = "de";
48 48
 
49 49
     /**
50 50
      * @var
@@ -58,7 +58,7 @@  discard block
 block discarded – undo
58 58
      */
59 59
     public function render(ElementInterface $element)
60 60
     {
61
-        $name   = $element->getName();
61
+        $name = $element->getName();
62 62
         if (empty($name) && $name !== 0) {
63 63
             throw new \DomainException(
64 64
                 sprintf(
@@ -82,10 +82,10 @@  discard block
 block discarded – undo
82 82
         $headscript->prependFile($basepath('/assets/jquery/jquery.min.js'));
83 83
 
84 84
         $headscript->offsetSetScript(
85
-            '1000_tinymce_' . $this->getTheme(),
85
+            '1000_tinymce_'.$this->getTheme(),
86 86
             '
87 87
             $(document).ready(function() {
88
-            tinyMCE.init({' . $this->additionalOptions() . ',
88
+            tinyMCE.init({' . $this->additionalOptions().',
89 89
                  setup:  function(editor) {
90 90
                     setPlaceHolder = function(editor, show) {
91 91
                         placeHolder = $("#placeholder-" + editor.id);
@@ -131,15 +131,15 @@  discard block
 block discarded – undo
131 131
         }
132 132
         if (is_string($content)) {
133 133
 
134
-            $class = array_key_exists('class', $attributes)?$attributes['class']:'';
135
-            $class .= (empty($class)?:' ') . ' tinymce_' . $this->getTheme();
134
+            $class = array_key_exists('class', $attributes) ? $attributes['class'] : '';
135
+            $class .= (empty($class) ?: ' ').' tinymce_'.$this->getTheme();
136 136
             $attributes['class'] = $class;
137 137
             $placeHolder = '';
138 138
             $elementOptions = $element->getOptions();
139 139
             if (array_key_exists('placeholder', $elementOptions) && !empty($elementOptions['placeholder'])) {
140
-                $placeHolder = '<div id="placeholder-' . $name . '" style="border: 0 none; position: relative; top: 0ex; left: 10px; color: #aaa; height: 0px; overflow: visible;' .
141
-                               (empty($content)?'':'display:none;') .
142
-                               '">' . $this->translator->translate($elementOptions['placeholder']) . '</div>';
140
+                $placeHolder = '<div id="placeholder-'.$name.'" style="border: 0 none; position: relative; top: 0ex; left: 10px; color: #aaa; height: 0px; overflow: visible;'.
141
+                               (empty($content) ? '' : 'display:none;').
142
+                               '">'.$this->translator->translate($elementOptions['placeholder']).'</div>';
143 143
             }
144 144
             return
145 145
                 $placeHolder
@@ -177,7 +177,7 @@  discard block
 block discarded – undo
177 177
      * @param $language
178 178
      */
179 179
     public function setLanguage($language) {
180
-        $this->language=$language;
180
+        $this->language = $language;
181 181
     }
182 182
 
183 183
     /**
@@ -186,7 +186,7 @@  discard block
 block discarded – undo
186 186
      * @param $languagePath
187 187
      */
188 188
     public function setLanguagePath($languagePath) {
189
-        $this->languagePath=$languagePath;
189
+        $this->languagePath = $languagePath;
190 190
     }
191 191
 
192 192
     /**
@@ -195,7 +195,7 @@  discard block
 block discarded – undo
195 195
      * @param $name
196 196
      * @param $value
197 197
      */
198
-    public function setOption($name,$value){
198
+    public function setOption($name, $value) {
199 199
         $this->options[$name] = $value;
200 200
 
201 201
         return $this;
@@ -208,7 +208,7 @@  discard block
 block discarded – undo
208 208
      */
209 209
     public function setOptions($options)
210 210
     {
211
-        foreach($options as $key => $val) {
211
+        foreach ($options as $key => $val) {
212 212
             $this->setOption($key, $val);
213 213
         }
214 214
     }
Please login to merge, or discard this patch.
module/Core/src/Core/Listener/AjaxRouteListener.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -47,7 +47,7 @@
 block discarded – undo
47 47
      * @var array
48 48
      */
49 49
     private $events = [
50
-        [ MvcEvent::EVENT_ROUTE, 'onRoute', 100 ],
50
+        [MvcEvent::EVENT_ROUTE, 'onRoute', 100],
51 51
     ];
52 52
 
53 53
     /**
Please login to merge, or discard this patch.
module/Geo/src/Geo/Service/Photon.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -28,11 +28,11 @@  discard block
 block discarded – undo
28 28
         $client->setMethod('GET');
29 29
 
30 30
         $osmTags = [
31
-            'tourism','aeroway','railway', 'amenity', 'historic', 'tunnel', 'mountain_pass',
31
+            'tourism', 'aeroway', 'railway', 'amenity', 'historic', 'tunnel', 'mountain_pass',
32 32
             'leisure', 'natural', 'bridge', 'waterway'
33 33
         ];
34 34
 
35
-        $osmTags = array_map(function($i) { return urlencode('!' . $i); }, $osmTags);
35
+        $osmTags = array_map(function($i) { return urlencode('!'.$i); }, $osmTags);
36 36
 
37 37
         $uri = sprintf(
38 38
             '%s?osm_tag=%s',
@@ -59,12 +59,12 @@  discard block
 block discarded – undo
59 59
     {
60 60
         $result = json_decode($result);
61 61
         $result = $result->features;
62
-        $r=[];
62
+        $r = [];
63 63
 
64 64
         foreach ($result as $key => $val) {
65
-            $row=[
66
-                  'postalCode' => (property_exists($val->properties, 'postcode') ? $val->properties->postcode:''),
67
-                  'city' =>(property_exists($val->properties, 'city') ? $val->properties->city:''),
65
+            $row = [
66
+                  'postalCode' => (property_exists($val->properties, 'postcode') ? $val->properties->postcode : ''),
67
+                  'city' =>(property_exists($val->properties, 'city') ? $val->properties->city : ''),
68 68
                   'street' => (property_exists($val->properties, 'street') ? $val->properties->street : ''),
69 69
                   'region' => (property_exists($val->properties, 'state') ? $val->properties->state : ''),
70 70
                   'country' => (property_exists($val->properties, 'country') ? $val->properties->country : ''),
@@ -81,7 +81,7 @@  discard block
 block discarded – undo
81 81
                 ];
82 82
             }
83 83
             //$row['id'] = json_encode($row);
84
-            $r[]=$row;
84
+            $r[] = $row;
85 85
         }
86 86
         return $r;
87 87
     }
Please login to merge, or discard this patch.
module/Core/src/Core/Controller/Plugin/SearchForm.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -72,11 +72,11 @@
 block discarded – undo
72 72
     public function get($form, $options = null, $params = null)
73 73
     {
74 74
         if (!is_object($form)) {
75
-            $form             = $this->formElementManager->get($form, $options);
75
+            $form = $this->formElementManager->get($form, $options);
76 76
         }
77 77
 
78 78
         /** @noinspection PhpUndefinedMethodInspection */
79
-        $params           = $params ?: clone $this->getController()->getRequest()->getQuery();
79
+        $params = $params ?: clone $this->getController()->getRequest()->getQuery();
80 80
 
81 81
         /* I tried using form methods (bind, isValid)...
82 82
          * but because the search form could be in an invalidated state
Please login to merge, or discard this patch.
module/Jobs/src/Jobs/Entity/Status.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -59,12 +59,12 @@  discard block
 block discarded – undo
59 59
     {
60 60
         parent::__construct($status);
61 61
 
62
-        $constant = 'self::' . strtoupper(str_replace(' ', '_', $status));
62
+        $constant = 'self::'.strtoupper(str_replace(' ', '_', $status));
63 63
         if (!defined($constant)) {
64
-            throw new \DomainException('Unknown status: ' . $status);
64
+            throw new \DomainException('Unknown status: '.$status);
65 65
         }
66
-        $this->name=constant($constant);
67
-        $this->order=$this->getOrder();
66
+        $this->name = constant($constant);
67
+        $this->order = $this->getOrder();
68 68
     }
69 69
 
70 70
     /**
@@ -74,7 +74,7 @@  discard block
 block discarded – undo
74 74
      */
75 75
     public function getName()
76 76
     {
77
-        return isset($this->name)?$this->name:'';
77
+        return isset($this->name) ? $this->name : '';
78 78
     }
79 79
 
80 80
     /**
Please login to merge, or discard this patch.
module/Core/src/Core/View/Helper/AjaxUrl.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -49,7 +49,7 @@  discard block
 block discarded – undo
49 49
      */
50 50
     public function __construct($basePath = '')
51 51
     {
52
-        $this->basePath = rtrim($basePath, '/') . '/';
52
+        $this->basePath = rtrim($basePath, '/').'/';
53 53
     }
54 54
 
55 55
     /**
@@ -64,7 +64,7 @@  discard block
 block discarded – undo
64 64
     public function __invoke($name, array $params = [])
65 65
     {
66 66
         if (is_array($name)) {
67
-            if (!isset($name[ 'ajax' ])) {
67
+            if (!isset($name['ajax'])) {
68 68
                 throw new \InvalidArgumentException('Key "ajax" is required when passing array as first argument.');
69 69
             }
70 70
             $params = $name;
Please login to merge, or discard this patch.
module/Core/src/Core/Entity/Status/AbstractStatus.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -58,7 +58,7 @@
 block discarded – undo
58 58
         $states = static::getStates();
59 59
 
60 60
         if (!in_array($state, $states)) {
61
-            throw new \InvalidArgumentException('Invalid state name: ' . $state);
61
+            throw new \InvalidArgumentException('Invalid state name: '.$state);
62 62
         }
63 63
 
64 64
         $this->state = $state;
Please login to merge, or discard this patch.
module/Core/src/Core/Entity/Hydrator/ImageSetHydrator.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -86,7 +86,7 @@  discard block
 block discarded – undo
86 86
         $imageSpecs = $this->options->getImages();
87 87
 
88 88
 
89
-        $images = [ ImageSetInterface::ORIGINAL => $this->createEntity($file, $data) ];
89
+        $images = [ImageSetInterface::ORIGINAL => $this->createEntity($file, $data)];
90 90
 
91 91
         foreach ($imageSpecs as $key => $size) {
92 92
             $newImage = ImageSetInterface::THUMBNAIL == $key
@@ -94,7 +94,7 @@  discard block
 block discarded – undo
94 94
                 : $this->createImage($image, $size);
95 95
 
96 96
             if ($newImage) {
97
-                $entity   = $this->createEntity($newImage, $data, $key);
97
+                $entity = $this->createEntity($newImage, $data, $key);
98 98
                 $images[$key] = $entity;
99 99
             }
100 100
         }
@@ -142,7 +142,7 @@  discard block
 block discarded – undo
142 142
 
143 143
         $entity
144 144
             ->setFile($file)
145
-            ->setName(($prefix ? "$prefix-" : '') . $data['name'])
145
+            ->setName(($prefix ? "$prefix-" : '').$data['name'])
146 146
             ->setType($data['type'])
147 147
         ;
148 148
 
Please login to merge, or discard this patch.
module/Core/src/Core/Options/ImageSetOptions.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -43,7 +43,7 @@
 block discarded – undo
43 43
      * @var array
44 44
      */
45 45
     protected $images = [
46
-        ImageSetInterface::THUMBNAIL => [100,100],
46
+        ImageSetInterface::THUMBNAIL => [100, 100],
47 47
     ];
48 48
 
49 49
     /**
Please login to merge, or discard this patch.