Test Setup Failed
Push — master ( 56ff4c...1f1266 )
by Chauncey
01:16
created
src/Charcoal/Cms/Route/SectionRoute.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -91,8 +91,8 @@
 block discarded – undo
91 91
             return $response->withStatus(404);
92 92
         }
93 93
 
94
-        $templateIdent      = (string)$section['templateIdent'];
95
-        $templateController = (string)$section['templateIdent'];
94
+        $templateIdent      = (string) $section['templateIdent'];
95
+        $templateController = (string) $section['templateIdent'];
96 96
 
97 97
         if (!$templateController) {
98 98
             $container['logger']->warning(sprintf(
Please login to merge, or discard this patch.
src/Charcoal/Cms/Route/NewsRoute.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -90,8 +90,8 @@
 block discarded – undo
90 90
             return $response->withStatus(404);
91 91
         }
92 92
 
93
-        $templateIdent      = (string)$news['templateIdent'];
94
-        $templateController = (string)$news['templateIdent'];
93
+        $templateIdent      = (string) $news['templateIdent'];
94
+        $templateController = (string) $news['templateIdent'];
95 95
 
96 96
         if (!$templateController) {
97 97
             $container['logger']->warning(sprintf(
Please login to merge, or discard this patch.
src/Charcoal/Cms/Support/Traits/SectionLoaderAwareTrait.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -83,7 +83,7 @@  discard block
 block discarded – undo
83 83
      */
84 84
     public function routes()
85 85
     {
86
-        return function ($arg) {
86
+        return function($arg) {
87 87
             return $this->sectionLoader()->resolveRoute($arg);
88 88
         };
89 89
     }
@@ -185,10 +185,10 @@  discard block
 block discarded – undo
185 185
         $documents = $section->getAttachments('document');
186 186
 
187 187
         return [
188
-            'title'         => (string)$section->title(),
189
-            'summary'       => (string)$section->summary(),
190
-            'image'         => (string)$section->image(),
191
-            'content'       => (string)$section->content(),
188
+            'title'         => (string) $section->title(),
189
+            'summary'       => (string) $section->summary(),
190
+            'image'         => (string) $section->image(),
191
+            'content'       => (string) $section->content(),
192 192
             'contentBlocks' => $contentBlocks,
193 193
             'gallery'       => $gallery,
194 194
             'documents'     => $documents
Please login to merge, or discard this patch.
src/Charcoal/Cms/Support/Helpers/DateHelper.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -87,7 +87,7 @@  discard block
 block discarded – undo
87 87
             $this->to = null;
88 88
         }
89 89
 
90
-        return (string)$this->formatDateFromCase($this->getDateCase());
90
+        return (string) $this->formatDateFromCase($this->getDateCase());
91 91
     }
92 92
 
93 93
     /**
@@ -199,18 +199,18 @@  discard block
 block discarded – undo
199 199
                            ? $this->translator()->translation($case['formats']['to'])
200 200
                            : null;
201 201
 
202
-        $formats['from'] = $this->crossPlatformFormat((string)$formats['from']);
203
-        $formats['to']   = $this->crossPlatformFormat((string)$formats['to']);
202
+        $formats['from'] = $this->crossPlatformFormat((string) $formats['from']);
203
+        $formats['to']   = $this->crossPlatformFormat((string) $formats['to']);
204 204
 
205 205
         if (!$this->to || !$formats['to']) {
206 206
             return sprintf(
207
-                (string)$content,
207
+                (string) $content,
208 208
                 strftime($formats['from'], $this->from->getTimestamp())
209 209
             );
210 210
         }
211 211
 
212 212
         return sprintf(
213
-            (string)$content,
213
+            (string) $content,
214 214
             strftime($formats['from'], $this->from->getTimestamp()),
215 215
             strftime($formats['to'], $this->to->getTimestamp())
216 216
         );
@@ -235,13 +235,13 @@  discard block
 block discarded – undo
235 235
 
236 236
         if (!$this->to || !$formats['to']) {
237 237
             return sprintf(
238
-                (string)$content,
238
+                (string) $content,
239 239
                 strftime($formats['from'], $this->from->getTimestamp())
240 240
             );
241 241
         }
242 242
 
243 243
         return sprintf(
244
-            (string)$content,
244
+            (string) $content,
245 245
             strftime($formats['from'], $this->from->getTimestamp()),
246 246
             strftime($formats['to'], $this->to->getTimestamp())
247 247
         );
Please login to merge, or discard this patch.
src/Charcoal/Admin/Widget/GroupAttachmentWidget.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -189,7 +189,7 @@  discard block
 block discarded – undo
189 189
                     $obj->objType(),
190 190
                     $obj->id()
191 191
                 );
192
-                $structureMetadata       = $this->metadataLoader()->load(
192
+                $structureMetadata = $this->metadataLoader()->load(
193 193
                     $controllerMetadataIdent,
194 194
                     $structureMetadata,
195 195
                     $interfaces
@@ -197,7 +197,7 @@  discard block
 block discarded – undo
197 197
             }
198 198
 
199 199
             $attachmentWidgets = $structureMetadata->get('attachments.widgets');
200
-            foreach ((array)$attachmentWidgets as $ident => $metadata) {
200
+            foreach ((array) $attachmentWidgets as $ident => $metadata) {
201 201
                 $this->addGroup($ident, $metadata);
202 202
             }
203 203
 
Please login to merge, or discard this patch.
src/Charcoal/Cms/EventCategory.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -31,7 +31,7 @@  discard block
 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
     }
@@ -77,14 +77,14 @@  discard block
 block discarded – undo
77 77
      * @param ValidatorInterface $v Optional. A custom validator object to use for validation. If null, use object's.
78 78
      * @return boolean
79 79
      */
80
-    public function validate(ValidatorInterface &$v = null)
80
+    public function validate(ValidatorInterface & $v = null)
81 81
     {
82 82
         parent::validate($v);
83 83
 
84 84
         foreach ($this->translator()->locales() as $locale => $value) {
85
-            if (!isset($this['name']) || !(string)$this['name'][$locale]) {
85
+            if (!isset($this['name']) || !(string) $this['name'][$locale]) {
86 86
                 $this->validator()->error(
87
-                    (string)$this->translator()->translation([
87
+                    (string) $this->translator()->translation([
88 88
                         'fr' => 'Le NOM doit être rempli dans toutes les langues.',
89 89
                         'en' => 'The NAME must be filled in all languages.',
90 90
                     ])
Please login to merge, or discard this patch.
src/Charcoal/Cms/NewsCategory.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -31,7 +31,7 @@  discard block
 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
     }
@@ -77,14 +77,14 @@  discard block
 block discarded – undo
77 77
      * @param ValidatorInterface $v Optional. A custom validator object to use for validation. If null, use object's.
78 78
      * @return boolean
79 79
      */
80
-    public function validate(ValidatorInterface &$v = null)
80
+    public function validate(ValidatorInterface & $v = null)
81 81
     {
82 82
         parent::validate($v);
83 83
 
84 84
         foreach ($this->translator()->locales() as $locale => $value) {
85
-            if (!(string)$this['name'][$locale]) {
85
+            if (!(string) $this['name'][$locale]) {
86 86
                 $this->validator()->error(
87
-                    (string)$this->translator()->translation([
87
+                    (string) $this->translator()->translation([
88 88
                         'fr' => 'Le NOM doit être rempli dans toutes les langues.',
89 89
                         'en' => 'The NAME must be filled in all languages.',
90 90
                     ])
Please login to merge, or discard this patch.