Test Setup Failed
Pull Request — master (#13)
by Chauncey
12:38
created
src/Charcoal/Property/DateTimeProperty.php 2 patches
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.
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -270,7 +270,7 @@  discard block
 block discarded – undo
270 270
     }
271 271
 
272 272
     /**
273
-     * @return array
273
+     * @return string[]
274 274
      */
275 275
     public function validationMethods()
276 276
     {
@@ -365,7 +365,7 @@  discard block
 block discarded – undo
365 365
     }
366 366
 
367 367
     /**
368
-     * @param  integer|string $timestamp Timestamp.
368
+     * @param  integer $timestamp Timestamp.
369 369
      * @return boolean
370 370
      */
371 371
     private function isValidTimeStamp($timestamp)
Please login to merge, or discard this patch.
src/Charcoal/Property/AbstractProperty.php 3 patches
Unused Use Statements   -2 removed lines patch added patch discarded remove patch
@@ -3,7 +3,6 @@  discard block
 block discarded – undo
3 3
 namespace Charcoal\Property;
4 4
 
5 5
 use PDO;
6
-use Exception;
7 6
 use LogicException;
8 7
 use RuntimeException;
9 8
 use InvalidArgumentException;
@@ -11,7 +10,6 @@  discard block
 block discarded – undo
11 10
 // From PSR-3
12 11
 use Psr\Log\LoggerAwareInterface;
13 12
 use Psr\Log\LoggerAwareTrait;
14
-use Psr\Log\NullLogger;
15 13
 
16 14
 // From Pimple
17 15
 use Pimple\Container;
Please login to merge, or discard this patch.
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -741,7 +741,7 @@
 block discarded – undo
741 741
     /**
742 742
      * Legacy support of active() instead of getActive().
743 743
      *
744
-     * @return string
744
+     * @return boolean
745 745
      */
746 746
     public function active()
747 747
     {
Please login to merge, or discard this 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/ModelStructureProperty.php 2 patches
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -2,7 +2,6 @@
 block discarded – undo
2 2
 
3 3
 namespace Charcoal\Property;
4 4
 
5
-use PDO;
6 5
 use ArrayAccess;
7 6
 use RuntimeException;
8 7
 use InvalidArgumentException;
Please login to merge, or discard this 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/StructureProperty.php 1 patch
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -4,7 +4,6 @@
 block discarded – undo
4 4
 
5 5
 use PDO;
6 6
 use InvalidArgumentException;
7
-use UnexpectedValueException;
8 7
 
9 8
 // From 'charcoal-translator'
10 9
 use Charcoal\Translator\Translation;
Please login to merge, or discard this patch.
src/Charcoal/Property/PropertyField.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -277,7 +277,7 @@
 block discarded – undo
277 277
     }
278 278
 
279 279
     /**
280
-     * @return mixed
280
+     * @return string
281 281
      */
282 282
     public function defaultVal()
283 283
     {
Please login to merge, or discard this patch.
src/Charcoal/Property/ObjectProperty.php 1 patch
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -5,7 +5,6 @@
 block discarded – undo
5 5
 use Traversable;
6 6
 use RuntimeException;
7 7
 use InvalidArgumentException;
8
-
9 8
 use PDO;
10 9
 
11 10
 // From PSR-6
Please login to merge, or discard this patch.
src/Charcoal/Property/DescribablePropertyTrait.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -61,7 +61,7 @@
 block discarded – undo
61 61
      *
62 62
      * @param  array $propertyIdents Optional. List of property identifiers
63 63
      *     for retrieving a subset of property objects.
64
-     * @return PropertyInterface[]|\Generator
64
+     * @return \Generator
65 65
      */
66 66
     public function properties(array $propertyIdents = null)
67 67
     {
Please login to merge, or discard this patch.
src/Charcoal/Property/EmailProperty.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -271,7 +271,7 @@
 block discarded – undo
271 271
     }
272 272
 
273 273
     /**
274
-     * @return array
274
+     * @return string[]
275 275
      */
276 276
     public function validationMethods()
277 277
     {
Please login to merge, or discard this patch.
src/Charcoal/Property/ImageProperty.php 2 patches
Doc Comments   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -159,7 +159,7 @@  discard block
 block discarded – undo
159 159
      *
160 160
      * @param  string|boolean $event A specific event to check or a global flag to set.
161 161
      * @throws OutOfBoundsException If the effects event does not exist.
162
-     * @return mixed Returns TRUE or FALSE if the property applies effects for the given event.
162
+     * @return boolean Returns TRUE or FALSE if the property applies effects for the given event.
163 163
      */
164 164
     public function canApplyEffects($event)
165 165
     {
@@ -179,7 +179,7 @@  discard block
 block discarded – undo
179 179
     /**
180 180
      * Retrieve the supported events where effects can be applied.
181 181
      *
182
-     * @return array
182
+     * @return string[]
183 183
      */
184 184
     public function acceptedEffectsEvents()
185 185
     {
@@ -465,7 +465,7 @@  discard block
 block discarded – undo
465 465
      * @param  array               $effects The effects to apply on the target.
466 466
      * @param  ImageInterface|null $image   Optional. The image for processing.
467 467
      * @throws InvalidArgumentException If the $value is not a string.
468
-     * @return mixed Returns the processed target or NULL.
468
+     * @return null|string Returns the processed target or NULL.
469 469
      */
470 470
     private function processEffectsOne($value, array $effects = null, ImageInterface $image = null)
471 471
     {
Please login to merge, or discard this 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.