Passed
Push — master ( 97b303...c6ee52 )
by
unknown
03:07
created
src/Charcoal/Cms/NewsCategory.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -34,7 +34,7 @@  discard block
 block discarded – undo
34 34
     {
35 35
         parent::__construct($data);
36 36
 
37
-        if (is_callable([ $this, 'defaultData' ])) {
37
+        if (is_callable([$this, 'defaultData'])) {
38 38
             $this->setData($this->defaultData());
39 39
         }
40 40
     }
@@ -88,9 +88,9 @@  discard block
 block discarded – undo
88 88
         parent::validate($v);
89 89
 
90 90
         foreach ($this->translator()->locales() as $locale => $value) {
91
-            if (!(string)$this->name()[$locale]) {
91
+            if (!(string) $this->name()[$locale]) {
92 92
                 $this->validator()->error(
93
-                    (string)$this->translator()->translation([
93
+                    (string) $this->translator()->translation([
94 94
                         'fr' => 'Le NOM doit être rempli dans toutes les langues.',
95 95
                         'en' => 'The NAME must be filled in all languages.',
96 96
                     ])
Please login to merge, or discard this patch.
src/Charcoal/Cms/EventCategory.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -34,7 +34,7 @@  discard block
 block discarded – undo
34 34
     {
35 35
         parent::__construct($data);
36 36
 
37
-        if (is_callable([ $this, 'defaultData' ])) {
37
+        if (is_callable([$this, 'defaultData'])) {
38 38
             $this->setData($this->defaultData());
39 39
         }
40 40
     }
@@ -88,9 +88,9 @@  discard block
 block discarded – undo
88 88
         parent::validate($v);
89 89
 
90 90
         foreach ($this->translator()->locales() as $locale => $value) {
91
-            if (!(string)$this->name()[$locale]) {
91
+            if (!(string) $this->name()[$locale]) {
92 92
                 $this->validator()->error(
93
-                    (string)$this->translator()->translation([
93
+                    (string) $this->translator()->translation([
94 94
                         'fr' => 'Le NOM doit être rempli dans toutes les langues.',
95 95
                         'en' => 'The NAME must be filled in all languages.',
96 96
                     ])
Please login to merge, or discard this patch.
src/Charcoal/Cms/TemplateableTrait.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -107,7 +107,7 @@  discard block
 block discarded – undo
107 107
         if ($property instanceof SelectablePropertyInterface) {
108 108
             if ($property->hasChoice($templateIdent)) {
109 109
                 $choice = $property->choice($templateIdent);
110
-                $keys   = [ 'controller', 'template', 'class' ];
110
+                $keys   = ['controller', 'template', 'class'];
111 111
                 foreach ($keys as $key) {
112 112
                     if (isset($choice[$key])) {
113 113
                         return $choice[$key];
@@ -183,7 +183,7 @@  discard block
 block discarded – undo
183 183
     public function hasTemplateOptions()
184 184
     {
185 185
         if ($this->templateOptionsStructure()) {
186
-            return (bool)count(
186
+            return (bool) count(
187 187
                 iterator_to_array(
188 188
                     $this->templateOptionsStructure()->properties()
189 189
                 )
@@ -245,7 +245,7 @@  discard block
 block discarded – undo
245 245
                 $struct = $property->structureVal($obj[$propertyIdent]);
246 246
 
247 247
                 /** Provide support for dynamically wrapping translation sets.  */
248
-                if (in_array(get_class($struct), [ Model::class, StructureModel::class ])) {
248
+                if (in_array(get_class($struct), [Model::class, StructureModel::class])) {
249 249
                     $struct = $this->translateTemplateOptionsModel($struct);
250 250
                 }
251 251
 
@@ -290,7 +290,7 @@  discard block
 block discarded – undo
290 290
             if ($property instanceof SelectablePropertyInterface) {
291 291
                 if ($property->hasChoice($val)) {
292 292
                     $choice = $property->choice($val);
293
-                    $keys   = [ 'controller', 'template', 'class' ];
293
+                    $keys   = ['controller', 'template', 'class'];
294 294
                     foreach ($keys as $key) {
295 295
                         if (isset($choice[$key])) {
296 296
                             $interface = $choice[$key];
Please login to merge, or discard this patch.
src/Charcoal/Cms/AbstractTag.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -31,7 +31,7 @@
 block discarded – undo
31 31
     {
32 32
         parent::__construct($data);
33 33
 
34
-        if (is_callable([ $this, 'defaultData' ])) {
34
+        if (is_callable([$this, 'defaultData'])) {
35 35
             $this->setData($this->defaultData());
36 36
         }
37 37
     }
Please login to merge, or discard this patch.
src/Charcoal/Cms/ServiceProvider/CmsServiceProvider.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -60,7 +60,7 @@  discard block
 block discarded – undo
60 60
          * @param Container $container Pimple DI Container.
61 61
          * @return CmsConfig Website configurations (from cms.json).
62 62
          */
63
-        $container['cms/config'] = function (Container $container) {
63
+        $container['cms/config'] = function(Container $container) {
64 64
             $appConfig = $container['config'];
65 65
             $cms = $appConfig->get('cms');
66 66
 
@@ -95,7 +95,7 @@  discard block
 block discarded – undo
95 95
          * @param Container $container Pimple DI Container.
96 96
          * @return DateHelper
97 97
          */
98
-        $container['cms/date/helper'] = function (Container $container) {
98
+        $container['cms/date/helper'] = function(Container $container) {
99 99
             return new DateHelper([
100 100
                 'date_formats' => $container['cms/config']->get('date_formats'),
101 101
                 'time_formats' => $container['cms/config']->get('time_formats'),
@@ -107,7 +107,7 @@  discard block
 block discarded – undo
107 107
          * @param Container $container Pimple DI Container.
108 108
          * @return DateHelper
109 109
          */
110
-        $container['date/helper'] = function (Container $container) {
110
+        $container['date/helper'] = function(Container $container) {
111 111
             trigger_error(sprintf(
112 112
                 '%s is deprecated, use %s instead',
113 113
                 '$container[\'date/helper\']',
@@ -128,7 +128,7 @@  discard block
 block discarded – undo
128 128
          * @param Container $container Pimple DI Container.
129 129
          * @return Factory
130 130
          */
131
-        $container['cms/section/factory'] = function (Container $container) {
131
+        $container['cms/section/factory'] = function(Container $container) {
132 132
             return new Factory([
133 133
                 'base_class'       => SectionInterface::class,
134 134
                 'arguments'        => $container['model/factory']->arguments(),
@@ -142,7 +142,7 @@  discard block
 block discarded – undo
142 142
          * @param Container $container Pimple DI Container.
143 143
          * @return SectionLoader
144 144
          */
145
-        $container['cms/section/loader'] = function (Container $container) {
145
+        $container['cms/section/loader'] = function(Container $container) {
146 146
             $sectionLoader = new SectionLoader([
147 147
                 'loader'     => $container['model/collection/loader'],
148 148
                 'factory'    => $container['model/factory'],
@@ -171,7 +171,7 @@  discard block
 block discarded – undo
171 171
          * @param Container $container Pimple DI Container.
172 172
          * @return NewsLoader
173 173
          */
174
-        $container['cms/news/loader'] = function (Container $container) {
174
+        $container['cms/news/loader'] = function(Container $container) {
175 175
             $newsLoader = new NewsLoader([
176 176
                 'loader'     => $container['model/collection/loader'],
177 177
                 'factory'    => $container['model/factory'],
@@ -192,7 +192,7 @@  discard block
 block discarded – undo
192 192
          * @param Container $container
193 193
          * @return NewsManager
194 194
          */
195
-        $container['cms/news/manager'] = function (Container $container) {
195
+        $container['cms/news/manager'] = function(Container $container) {
196 196
 
197 197
             $newsManager = new NewsManager([
198 198
                 'loader'      => $container['model/collection/loader'],
@@ -217,7 +217,7 @@  discard block
 block discarded – undo
217 217
          * @param Container $container Pimple DI Container.
218 218
          * @return EventLoader
219 219
          */
220
-        $container['cms/event/loader'] = function (Container $container) {
220
+        $container['cms/event/loader'] = function(Container $container) {
221 221
             $eventLoader = new EventLoader([
222 222
                 'loader'     => $container['model/collection/loader'],
223 223
                 'factory'    => $container['model/factory'],
@@ -241,7 +241,7 @@  discard block
 block discarded – undo
241 241
          * @param Container $container
242 242
          * @return EventManager
243 243
          */
244
-        $container['cms/event/manager'] = function (Container $container) {
244
+        $container['cms/event/manager'] = function(Container $container) {
245 245
 
246 246
             $eventManager = new EventManager([
247 247
                 'loader'       => $container['model/collection/loader'],
Please login to merge, or discard this patch.