Test Setup Failed
Push — master ( 8f3403...5df2d2 )
by Chauncey
01:11
created
src/Charcoal/Property/DateTimeProperty.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -161,8 +161,8 @@
 block discarded – undo
161 161
     private function dateTimeVal($val)
162 162
     {
163 163
         if ($val === null ||
164
-            (is_string($val) && ! strlen(trim($val))) ||
165
-            (is_array($val) && ! count(array_filter($val, 'strlen')))
164
+            (is_string($val) && !strlen(trim($val))) ||
165
+            (is_array($val) && !count(array_filter($val, 'strlen')))
166 166
         ) {
167 167
             return null;
168 168
         }
Please login to merge, or discard this patch.
src/Charcoal/Property/ModelStructureProperty.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -570,7 +570,7 @@
 block discarded – undo
570 570
                 $objs = (array)$this->structureVal($val);
571 571
                 $val  = [];
572 572
                 if (!empty($objs)) {
573
-                    $val  = [];
573
+                    $val = [];
574 574
                     foreach ($objs as $obj) {
575 575
                         $obj->saveProperties();
576 576
                         $val[] = $obj->data();
Please login to merge, or discard this patch.
src/Charcoal/Property/ImageProperty.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -418,7 +418,7 @@
 block discarded – undo
418 418
                 'reset'   => false,
419 419
                 'copy'    => null,
420 420
             ];
421
-            $fxGroup   = $blueprint;
421
+            $fxGroup = $blueprint;
422 422
             foreach ($effects as $effect) {
423 423
                 if (isset($effect['type']) && $effect['type'] === 'condition') {
424 424
                     $grouped[] = array_merge(
Please login to merge, or discard this patch.
src/Charcoal/Property/FileProperty.php 2 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -30,7 +30,7 @@
 block discarded – undo
30 30
         UPLOAD_ERR_OK         => 'There is no error, the file uploaded with success',
31 31
         UPLOAD_ERR_INI_SIZE   => 'The uploaded file exceeds the upload_max_filesize directive in php.ini',
32 32
         UPLOAD_ERR_FORM_SIZE  => 'The uploaded file exceeds the MAX_FILE_SIZE directive'.
33
-                                 'that was specified in the HTML form',
33
+                                    'that was specified in the HTML form',
34 34
         UPLOAD_ERR_PARTIAL    => 'The uploaded file was only partially uploaded',
35 35
         UPLOAD_ERR_NO_FILE    => 'No file was uploaded',
36 36
         UPLOAD_ERR_NO_TMP_DIR => 'Missing a temporary folder',
Please login to merge, or discard this patch.
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -489,7 +489,7 @@  discard block
 block discarded – undo
489 489
             $factor = floor((strlen($bytes) - 1) / 3);
490 490
         }
491 491
 
492
-        $unit = [ 'B', 'kB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB' ];
492
+        $unit = ['B', 'kB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB'];
493 493
 
494 494
         $factor = floor((strlen($bytes) - 1) / 3);
495 495
 
@@ -623,12 +623,12 @@  discard block
 block discarded – undo
623 623
         }
624 624
 
625 625
         $array = $this->parseValAsMultiple($value);
626
-        array_walk_recursive($array, function ($item) use (&$files) {
626
+        array_walk_recursive($array, function($item) use (&$files) {
627 627
             $array = $this->parseValAsMultiple($item);
628 628
             $files = array_merge($files, $array);
629 629
         });
630 630
 
631
-        $files = array_filter($files, function ($file) {
631
+        $files = array_filter($files, function($file) {
632 632
             return is_string($file) && isset($file[0]);
633 633
         });
634 634
         $files = array_unique($files);
@@ -726,7 +726,7 @@  discard block
 block discarded – undo
726 726
     {
727 727
         // Bag value if singular
728 728
         if (!is_array($values) || isset($values['id'])) {
729
-            $values = [ $values ];
729
+            $values = [$values];
730 730
         }
731 731
 
732 732
         $parsed = [];
@@ -766,7 +766,7 @@  discard block
 block discarded – undo
766 766
     {
767 767
         // Bag value if singular
768 768
         if (isset($files['error'])) {
769
-            $files = [ $files ];
769
+            $files = [$files];
770 770
         }
771 771
 
772 772
         $parsed = [];
@@ -808,7 +808,7 @@  discard block
 block discarded – undo
808 808
 
809 809
         if ($this['multiple']) {
810 810
             if (!is_array($values)) {
811
-                $values = empty($values) && !is_numeric($values) ? [] : [ $values ];
811
+                $values = empty($values) && !is_numeric($values) ? [] : [$values];
812 812
             }
813 813
         } else {
814 814
             if (is_array($values)) {
@@ -1065,7 +1065,7 @@  discard block
 block discarded – undo
1065 1065
     public function sanitizeFilename($filename)
1066 1066
     {
1067 1067
         // Remove blacklisted caharacters
1068
-        $blacklist = [ '/', '\\', '\0', '*', ':', '?', '"', '<', '>', '|', '#', '&', '!', '`', ' ' ];
1068
+        $blacklist = ['/', '\\', '\0', '*', ':', '?', '"', '<', '>', '|', '#', '&', '!', '`', ' '];
1069 1069
         $filename  = str_replace($blacklist, '_', (string)$filename);
1070 1070
 
1071 1071
         // Avoid hidden file or trailing dot
@@ -1575,7 +1575,7 @@  discard block
 block discarded – undo
1575 1575
     {
1576 1576
         $propIdent = $this->ident();
1577 1577
 
1578
-        $filterErrNoFile = function (array $file) {
1578
+        $filterErrNoFile = function(array $file) {
1579 1579
             return $file['error'] !== UPLOAD_ERR_NO_FILE;
1580 1580
         };
1581 1581
         $uploadedFiles = static::parseUploadedFiles($_FILES, $filterErrNoFile, $propIdent);
Please login to merge, or discard this patch.
src/Charcoal/Property/AbstractProperty.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -351,13 +351,13 @@  discard block
 block discarded – undo
351 351
                 return $val;
352 352
             }
353 353
 
354
-            $val = array_map([ $this, 'parseOne' ], $val);
354
+            $val = array_map([$this, 'parseOne'], $val);
355 355
         } else {
356 356
             if ($this['l10n']) {
357 357
                 $val = $this->parseValAsL10n($val);
358 358
 
359 359
                 if ($val) {
360
-                    $val->sanitize([ $this, 'parseOne' ]);
360
+                    $val->sanitize([$this, 'parseOne']);
361 361
                 }
362 362
             } else {
363 363
                 $val = $this->parseOne($val);
@@ -478,7 +478,7 @@  discard block
 block discarded – undo
478 478
     public function getLabel()
479 479
     {
480 480
         if ($this->label === null) {
481
-            return ucwords(str_replace([ '.', '_' ], ' ', $this->ident()));
481
+            return ucwords(str_replace(['.', '_'], ' ', $this->ident()));
482 482
         }
483 483
 
484 484
         return $this->label;
Please login to merge, or discard this patch.
src/Charcoal/Property/PropertyValidator.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -25,7 +25,7 @@
 block discarded – undo
25 25
         foreach ($methods as $method) {
26 26
             $method = $this->camelize($method);
27 27
 
28
-            $func = [ $property, 'validate'.ucfirst($method) ];
28
+            $func = [$property, 'validate'.ucfirst($method)];
29 29
             if (is_callable($func)) {
30 30
                 $result = $result && call_user_func($func);
31 31
             }
Please login to merge, or discard this patch.
src/Charcoal/Property/SpriteProperty.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -150,7 +150,7 @@
 block discarded – undo
150 150
             foreach ($xml->symbol as $node) {
151 151
                 $i++;
152 152
 
153
-                $id = (string) $node->attributes()->id;
153
+                $id = (string)$node->attributes()->id;
154 154
 
155 155
                 if (!$id) {
156 156
                     $this->logger->warning(sprintf(
Please login to merge, or discard this patch.