Passed
Branch master (7e4b7e)
by Mariano
04:51
created
src/Strategies/Properties/SimplePropertyParser.php 2 patches
Doc Comments   -1 removed lines patch added patch discarded remove patch
@@ -48,7 +48,6 @@
 block discarded – undo
48 48
      * Filters and validates a value. And return the filtered value.
49 49
      * It throws an exception if the value is not valid.
50 50
      *
51
-     * @param mixed $value
52 51
      * @return mixed
53 52
      *
54 53
      * @throws \Mcustiel\SimpleRequest\Exception\InvalidValueException
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -88,7 +88,7 @@
 block discarded – undo
88 88
         foreach ($this->validators as $validator) {
89 89
             if (!$validator->validate($value)) {
90 90
                 throw new InvalidValueException(
91
-                    "Field {$this->name}, was set with invalid value: " . var_export($value, true)
91
+                    "Field {$this->name}, was set with invalid value: ".var_export($value, true)
92 92
                 );
93 93
             }
94 94
         }
Please login to merge, or discard this patch.
src/Util/FilterBuilder.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -44,9 +44,9 @@
 block discarded – undo
44 44
             throw new FilterDoesNotExistException("Filter class {$type} does not exist");
45 45
         }
46 46
         $filter = new $type;
47
-        if (! ($filter instanceof FilterInterface)) {
47
+        if (!($filter instanceof FilterInterface)) {
48 48
             throw new FilterDoesNotExistException(
49
-                "Filter class {$type} must implement " . FilterInterface::class
49
+                "Filter class {$type} must implement ".FilterInterface::class
50 50
             );
51 51
         }
52 52
 
Please login to merge, or discard this patch.
src/Util/ValidatorBuilder.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -43,9 +43,9 @@
 block discarded – undo
43 43
             throw new ValidatorDoesNotExistException("Validator class {$type} does not exist");
44 44
         }
45 45
         $validator = new $type;
46
-        if (! ($validator instanceof ValidatorInterface)) {
46
+        if (!($validator instanceof ValidatorInterface)) {
47 47
             throw new ValidatorDoesNotExistException(
48
-                "Validator class {$type} must implement " . ValidatorInterface::class
48
+                "Validator class {$type} must implement ".ValidatorInterface::class
49 49
             );
50 50
         }
51 51
 
Please login to merge, or discard this patch.
src/Strategies/AnnotationParserFactory.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -29,6 +29,6 @@
 block discarded – undo
29 29
                 return new $val;
30 30
             }
31 31
         }
32
-        throw new \Exception('Unsupported annotation: ' . get_class($annotation));
32
+        throw new \Exception('Unsupported annotation: '.get_class($annotation));
33 33
     }
34 34
 }
Please login to merge, or discard this patch.
src/RequestParser.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -78,7 +78,7 @@
 block discarded – undo
78 78
         $value = $propertyParser->parse(
79 79
             $this->getFromRequest($request, $propertyName)
80 80
         );
81
-        $method = 'set' . ucfirst($propertyName);
81
+        $method = 'set'.ucfirst($propertyName);
82 82
         $object->$method($value);
83 83
     }
84 84
 
Please login to merge, or discard this patch.
src/FirstErrorRequestParser.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -42,7 +42,7 @@
 block discarded – undo
42 42
             try {
43 43
                 $this->setProperty($request, $object, $propertyName, $propertyParser);
44 44
             } catch (InvalidValueException $e) {
45
-                $exception = new InvalidRequestException($propertyName . ': ' . $e->getMessage());
45
+                $exception = new InvalidRequestException($propertyName.': '.$e->getMessage());
46 46
                 $exception->setErrors([$propertyName => $e->getMessage()]);
47 47
                 throw $exception;
48 48
             }
Please login to merge, or discard this patch.
src/RequestBuilder.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -73,7 +73,7 @@
 block discarded – undo
73 73
 
74 74
     private function generateRequestParserObject($className, $parser)
75 75
     {
76
-        $cacheKey = str_replace('\\', '', $className . get_class($parser));
76
+        $cacheKey = str_replace('\\', '', $className.get_class($parser));
77 77
         $cacheItem = $this->cache->getItem($cacheKey);
78 78
         $return = $cacheItem->get();
79 79
         if ($return === null) {
Please login to merge, or discard this patch.
src/Validator/Properties.php 2 patches
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -141,6 +141,9 @@
 block discarded – undo
141 141
         return $this->validateListItems(array_slice($keys, $count, count($list) - $count));
142 142
     }
143 143
 
144
+    /**
145
+     * @param integer[] $array
146
+     */
144 147
     private function validateListItems($array)
145 148
     {
146 149
         foreach ($array as $item) {
Please login to merge, or discard this 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
             }
190 190
         } else {
191 191
             throw new UnspecifiedValidatorException(
192
-                'The validator Properties is being initialized with an invalid ' . self::ITEMS_INDEX . ' parameter'
192
+                'The validator Properties is being initialized with an invalid '.self::ITEMS_INDEX.' parameter'
193 193
             );
194 194
         }
195 195
     }
@@ -209,7 +209,7 @@  discard block
 block discarded – undo
209 209
             );
210 210
         } else {
211 211
             throw new UnspecifiedValidatorException(
212
-                'The validator Properties is being initialized with an invalid ' . self::ADDITIONAL_ITEMS_INDEX . ' parameter'
212
+                'The validator Properties is being initialized with an invalid '.self::ADDITIONAL_ITEMS_INDEX.' parameter'
213 213
             );
214 214
         }
215 215
     }
Please login to merge, or discard this patch.