Passed
Push — master ( 24cd0f...3a3149 )
by Nate
03:26
created
src/Internal/TypeAdapter/JsonElementTypeAdapter.php 2 patches
Upper-Lower-Casing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -59,7 +59,7 @@
 block discarded – undo
59 59
                 return JsonPrimitive::create($reader->nextDouble());
60 60
             case JsonToken::BOOLEAN:
61 61
                 return JsonPrimitive::create($reader->nextBoolean());
62
-            case JsonToken::NULL:
62
+            case JsonToken::null:
63 63
                 $reader->nextNull();
64 64
 
65 65
                 return new JsonNull();
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -4,7 +4,7 @@
 block discarded – undo
4 4
  * Distributed under the MIT License (http://opensource.org/licenses/MIT)
5 5
  */
6 6
 
7
-declare(strict_types=1);
7
+declare(strict_types = 1);
8 8
 
9 9
 namespace Tebru\Gson\Internal\TypeAdapter;
10 10
 
Please login to merge, or discard this patch.
src/Internal/TypeAdapter/ReflectionTypeAdapter.php 2 patches
Upper-Lower-Casing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -94,7 +94,7 @@
 block discarded – undo
94 94
      */
95 95
     public function read(JsonReadable $reader)
96 96
     {
97
-        if ($reader->peek() === JsonToken::NULL) {
97
+        if ($reader->peek() === JsonToken::null) {
98 98
             return $reader->nextNull();
99 99
         }
100 100
 
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -4,7 +4,7 @@
 block discarded – undo
4 4
  * Distributed under the MIT License (http://opensource.org/licenses/MIT)
5 5
  */
6 6
 
7
-declare(strict_types=1);
7
+declare(strict_types = 1);
8 8
 
9 9
 namespace Tebru\Gson\Internal\TypeAdapter;
10 10
 
Please login to merge, or discard this patch.
src/Internal/JsonDecodeReader.php 2 patches
Upper-Lower-Casing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -170,7 +170,7 @@
 block discarded – undo
170 170
             case 'boolean':
171 171
                 return JsonToken::BOOLEAN;
172 172
             case 'NULL':
173
-                $token = JsonToken::NULL;
173
+                $token = JsonToken::null;
174 174
                 break;
175 175
             case StdClassIterator::class:
176 176
                 /** @var StdClassIterator $element */
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -4,7 +4,7 @@  discard block
 block discarded – undo
4 4
  * Distributed under the MIT License (http://opensource.org/licenses/MIT)
5 5
  */
6 6
 
7
-declare(strict_types=1);
7
+declare(strict_types = 1);
8 8
 
9 9
 namespace Tebru\Gson\Internal;
10 10
 
@@ -216,11 +216,11 @@  discard block
 block discarded – undo
216 216
         $result = '$';
217 217
         foreach ($this->stack as $index => $item) {
218 218
             if ($item instanceof ArrayIterator && isset($this->pathIndices[$index])) {
219
-                $result .= '['.$this->pathIndices[$index].']';
219
+                $result .= '[' . $this->pathIndices[$index] . ']';
220 220
             }
221 221
 
222 222
             if ($item instanceof StdClassIterator && isset($this->pathNames[$index])) {
223
-                $result .= '.'.$this->pathNames[$index];
223
+                $result .= '.' . $this->pathNames[$index];
224 224
             }
225 225
         }
226 226
 
Please login to merge, or discard this patch.
src/Internal/TypeAdapter/WildcardTypeAdapter.php 2 patches
Upper-Lower-Casing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -66,8 +66,8 @@
 block discarded – undo
66 66
             case JsonToken::NUMBER:
67 67
                 $type = new TypeToken(TypeToken::FLOAT);
68 68
                 break;
69
-            case JsonToken::NULL:
70
-                $type = new TypeToken(TypeToken::NULL);
69
+            case JsonToken::null:
70
+                $type = new TypeToken(TypeToken::null);
71 71
                 break;
72 72
             default:
73 73
                 throw new JsonSyntaxException(
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -4,7 +4,7 @@
 block discarded – undo
4 4
  * Distributed under the MIT License (http://opensource.org/licenses/MIT)
5 5
  */
6 6
 
7
-declare(strict_types=1);
7
+declare(strict_types = 1);
8 8
 
9 9
 namespace Tebru\Gson\Internal\TypeAdapter;
10 10
 
Please login to merge, or discard this patch.
src/Internal/TypeAdapter/ArrayTypeAdapter.php 2 patches
Upper-Lower-Casing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -56,7 +56,7 @@
 block discarded – undo
56 56
      */
57 57
     public function read(JsonReadable $reader): ?array
58 58
     {
59
-        if ($reader->peek() === JsonToken::NULL) {
59
+        if ($reader->peek() === JsonToken::null) {
60 60
             return $reader->nextNull();
61 61
         }
62 62
 
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -4,7 +4,7 @@  discard block
 block discarded – undo
4 4
  * Distributed under the MIT License (http://opensource.org/licenses/MIT)
5 5
  */
6 6
 
7
-declare(strict_types=1);
7
+declare(strict_types = 1);
8 8
 
9 9
 namespace Tebru\Gson\Internal\TypeAdapter;
10 10
 
@@ -56,7 +56,7 @@  discard block
 block discarded – undo
56 56
      * @throws \Tebru\Gson\Exception\JsonSyntaxException If trying to read from non object/array
57 57
      * @throws \Tebru\PhpType\Exception\MalformedTypeException If the type cannot be parsed
58 58
      */
59
-    public function read(JsonReadable $reader): ?array
59
+    public function read(JsonReadable $reader): ? array
60 60
     {
61 61
         if ($reader->peek() === JsonToken::NULL) {
62 62
             return $reader->nextNull();
Please login to merge, or discard this patch.
src/Internal/Data/Property.php 2 patches
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -113,8 +113,7 @@
 block discarded – undo
113 113
         AnnotationCollection $annotations,
114 114
         int $modifiers,
115 115
         bool $virtual
116
-    )
117
-    {
116
+    ) {
118 117
         $this->realName = $realName;
119 118
         $this->serializedName = $serializedName;
120 119
         $this->type = $type;
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -4,7 +4,7 @@
 block discarded – undo
4 4
  * Distributed under the MIT License (http://opensource.org/licenses/MIT)
5 5
  */
6 6
 
7
-declare(strict_types=1);
7
+declare(strict_types = 1);
8 8
 
9 9
 namespace Tebru\Gson\Internal\Data;
10 10
 
Please login to merge, or discard this patch.
src/MethodNamingStrategy.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -4,7 +4,7 @@
 block discarded – undo
4 4
  * Distributed under the MIT License (http://opensource.org/licenses/MIT)
5 5
  */
6 6
 
7
-declare(strict_types=1);
7
+declare(strict_types = 1);
8 8
 
9 9
 namespace Tebru\Gson;
10 10
 
Please login to merge, or discard this patch.
src/GsonBuilder.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -4,7 +4,7 @@  discard block
 block discarded – undo
4 4
  * Distributed under the MIT License (http://opensource.org/licenses/MIT)
5 5
  */
6 6
 
7
-declare(strict_types=1);
7
+declare(strict_types = 1);
8 8
 
9 9
 namespace Tebru\Gson;
10 10
 
@@ -333,7 +333,7 @@  discard block
 block discarded – undo
333 333
      */
334 334
     public function setCacheDir(string $cacheDir): GsonBuilder
335 335
     {
336
-        $this->cacheDir = $cacheDir.'/gson';
336
+        $this->cacheDir = $cacheDir . '/gson';
337 337
 
338 338
         return $this;
339 339
     }
@@ -355,7 +355,7 @@  discard block
 block discarded – undo
355 355
         $propertyNamingStrategy = $this->propertyNamingStrategy ?? new SnakePropertyNamingStrategy();
356 356
         $methodNamingStrategy = $this->methodNamingStrategy ?? new UpperCaseMethodNamingStrategy();
357 357
 
358
-        $doctrineAnnotationCache = false === $this->enableCache ? new ArrayCache(): new ChainCache([new ArrayCache(), new FilesystemCache($this->cacheDir)]);
358
+        $doctrineAnnotationCache = false === $this->enableCache ? new ArrayCache() : new ChainCache([new ArrayCache(), new FilesystemCache($this->cacheDir)]);
359 359
         $doctrineAnnotationCache->setNamespace('doctrine_annotation_cache');
360 360
         $reader = new CachedReader(new AnnotationReader(), $doctrineAnnotationCache);
361 361
 
Please login to merge, or discard this patch.
src/ClassMetadata.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -4,7 +4,7 @@  discard block
 block discarded – undo
4 4
  * Distributed under the MIT License (http://opensource.org/licenses/MIT)
5 5
  */
6 6
 
7
-declare(strict_types=1);
7
+declare(strict_types = 1);
8 8
 
9 9
 namespace Tebru\Gson;
10 10
 
@@ -41,7 +41,7 @@  discard block
 block discarded – undo
41 41
      * @param string $annotationClass
42 42
      * @return null|AbstractAnnotation
43 43
      */
44
-    public function getAnnotation(string $annotationClass): ?AbstractAnnotation;
44
+    public function getAnnotation(string $annotationClass): ? AbstractAnnotation;
45 45
 
46 46
     /**
47 47
      * Returns an array of [@see PropertyMetadata] objects
@@ -56,7 +56,7 @@  discard block
 block discarded – undo
56 56
      * @param string $propertyName
57 57
      * @return PropertyMetadata|null
58 58
      */
59
-    public function getProperty(string $propertyName): ?PropertyMetadata;
59
+    public function getProperty(string $propertyName): ? PropertyMetadata;
60 60
 
61 61
     /**
62 62
      * Add [@see PropertyMetadata] link
Please login to merge, or discard this patch.