Completed
Push — master ( bc20b4...b7ce52 )
by Nate
03:15
created
src/Internal/TypeAdapter/DateTimeTypeAdapter.php 2 patches
Upper-Lower-Casing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -50,7 +50,7 @@
 block discarded – undo
50 50
      */
51 51
     public function read(JsonReadable $reader): ?DateTime
52 52
     {
53
-        if ($reader->peek() === JsonToken::NULL) {
53
+        if ($reader->peek() === JsonToken::null) {
54 54
             return $reader->nextNull();
55 55
         }
56 56
 
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -50,7 +50,7 @@
 block discarded – undo
50 50
      * @return DateTime|null
51 51
      * @throws \Tebru\Gson\Exception\JsonSyntaxException If the DateTime could not be created from format
52 52
      */
53
-    public function read(JsonReadable $reader): ?DateTime
53
+    public function read(JsonReadable $reader): ? DateTime
54 54
     {
55 55
         if ($reader->peek() === JsonToken::NULL) {
56 56
             return $reader->nextNull();
Please login to merge, or discard this patch.
src/Internal/TypeAdapter/JsonElementTypeAdapter.php 1 patch
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.
src/Internal/TypeAdapter/ReflectionTypeAdapter.php 1 patch
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.
src/Internal/JsonDecodeReader.php 2 patches
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -211,11 +211,11 @@
 block discarded – undo
211 211
         $result = '$';
212 212
         foreach ($this->stack as $index => $item) {
213 213
             if ($item instanceof ArrayIterator && isset($this->pathIndices[$index])) {
214
-                $result .= '['.$this->pathIndices[$index].']';
214
+                $result .= '[' . $this->pathIndices[$index] . ']';
215 215
             }
216 216
 
217 217
             if ($item instanceof StdClassIterator && isset($this->pathNames[$index])) {
218
-                $result .= '.'.$this->pathNames[$index];
218
+                $result .= '.' . $this->pathNames[$index];
219 219
             }
220 220
         }
221 221
 
Please login to merge, or discard this patch.
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.
src/Internal/TypeAdapter/ArrayTypeAdapter.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -54,7 +54,7 @@
 block discarded – undo
54 54
      * @throws \Tebru\Gson\Exception\JsonSyntaxException If trying to read from non object/array
55 55
      * @throws \Tebru\PhpType\Exception\MalformedTypeException If the type cannot be parsed
56 56
      */
57
-    public function read(JsonReadable $reader): ?array
57
+    public function read(JsonReadable $reader): ? array
58 58
     {
59 59
         if ($reader->peek() === JsonToken::NULL) {
60 60
             return $reader->nextNull();
Please login to merge, or discard this patch.
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.
src/Internal/TypeAdapter/WildcardTypeAdapter.php 1 patch
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.
src/ClassMetadata.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -54,7 +54,7 @@
 block discarded – undo
54 54
      * @param string $propertyName
55 55
      * @return PropertyMetadata|null
56 56
      */
57
-    public function getProperty(string $propertyName): ?PropertyMetadata;
57
+    public function getProperty(string $propertyName): ? PropertyMetadata;
58 58
 
59 59
     /**
60 60
      * Add [@see PropertyMetadata] link
Please login to merge, or discard this patch.
src/Internal/DefaultClassMetadata.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -80,7 +80,7 @@  discard block
 block discarded – undo
80 80
      * @param string $annotationClass
81 81
      * @return null|AbstractAnnotation
82 82
      */
83
-    public function getAnnotation(string $annotationClass): ?AbstractAnnotation
83
+    public function getAnnotation(string $annotationClass): ? AbstractAnnotation
84 84
     {
85 85
         return $this->annotations->get($annotationClass);
86 86
     }
@@ -101,7 +101,7 @@  discard block
 block discarded – undo
101 101
      * @param string $propertyName
102 102
      * @return PropertyMetadata|null
103 103
      */
104
-    public function getProperty(string $propertyName): ?PropertyMetadata
104
+    public function getProperty(string $propertyName): ? PropertyMetadata
105 105
     {
106 106
         foreach ($this->propertyMetadata as $property) {
107 107
             if ($property->getName() === $propertyName) {
Please login to merge, or discard this patch.
src/Internal/AccessorMethodProvider.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -50,7 +50,7 @@  discard block
 block discarded – undo
50 50
         ReflectionClass $reflectionClass,
51 51
         ReflectionProperty $reflectionProperty,
52 52
         AnnotationCollection $annotations
53
-    ): ?ReflectionMethod {
53
+    ): ? ReflectionMethod {
54 54
         /** @var Accessor $accessorAnnotation */
55 55
         $accessorAnnotation = $annotations->get(Accessor::class);
56 56
         $getters = null !== $accessorAnnotation && null !== $accessorAnnotation->getter()
@@ -73,7 +73,7 @@  discard block
 block discarded – undo
73 73
         ReflectionClass $reflectionClass,
74 74
         ReflectionProperty $reflectionProperty,
75 75
         AnnotationCollection $annotations
76
-    ): ?ReflectionMethod {
76
+    ): ? ReflectionMethod {
77 77
         /** @var Accessor $accessorAnnotation */
78 78
         $accessorAnnotation = $annotations->get(Accessor::class);
79 79
         $setters = null !== $accessorAnnotation && null !== $accessorAnnotation->setter()
@@ -91,7 +91,7 @@  discard block
 block discarded – undo
91 91
      * @param array $accessors
92 92
      * @return null|ReflectionMethod
93 93
      */
94
-    private function reflectionClassMethod(ReflectionClass $reflectionClass, array $accessors): ?ReflectionMethod
94
+    private function reflectionClassMethod(ReflectionClass $reflectionClass, array $accessors): ? ReflectionMethod
95 95
     {
96 96
         foreach ($accessors as $method) {
97 97
             if (!$reflectionClass->hasMethod($method)) {
Please login to merge, or discard this patch.