@@ -4,7 +4,7 @@ discard block |
||
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\AccessorStrategy; |
10 | 10 | |
@@ -55,7 +55,7 @@ discard block |
||
55 | 55 | public function set($object, $value): void |
56 | 56 | { |
57 | 57 | if (null === $this->setter) { |
58 | - $this->setter = Closure::bind(function ($object, $value, string $propertyName) { |
|
58 | + $this->setter = Closure::bind(function($object, $value, string $propertyName) { |
|
59 | 59 | $object->{$propertyName} = $value; |
60 | 60 | }, null, $this->className); |
61 | 61 | } |
@@ -4,7 +4,7 @@ |
||
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\ObjectConstructor; |
10 | 10 |
@@ -4,7 +4,7 @@ discard block |
||
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 | |
@@ -24,7 +24,7 @@ discard block |
||
24 | 24 | */ |
25 | 25 | public function __construct(JsonObject $jsonObject) |
26 | 26 | { |
27 | - foreach($jsonObject as $key => $value) { |
|
27 | + foreach ($jsonObject as $key => $value) { |
|
28 | 28 | $this->queue[] = [$key, $value]; |
29 | 29 | $this->total++; |
30 | 30 | } |
@@ -4,7 +4,7 @@ discard block |
||
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 | |
@@ -140,7 +140,7 @@ discard block |
||
140 | 140 | */ |
141 | 141 | public function getTypeName(): string |
142 | 142 | { |
143 | - return (string) $this->type; |
|
143 | + return (string)$this->type; |
|
144 | 144 | } |
145 | 145 | |
146 | 146 | /** |
@@ -189,7 +189,7 @@ discard block |
||
189 | 189 | * @param string $annotationName |
190 | 190 | * @return null|AbstractAnnotation |
191 | 191 | */ |
192 | - public function getAnnotation(string $annotationName): ?AbstractAnnotation |
|
192 | + public function getAnnotation(string $annotationName): ? AbstractAnnotation |
|
193 | 193 | { |
194 | 194 | return $this->annotations->get($annotationName); |
195 | 195 | } |
@@ -4,7 +4,7 @@ discard block |
||
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 | |
@@ -52,7 +52,7 @@ discard block |
||
52 | 52 | ReflectionClass $reflectionClass, |
53 | 53 | ReflectionProperty $reflectionProperty, |
54 | 54 | AnnotationCollection $annotations |
55 | - ): ?ReflectionMethod { |
|
55 | + ): ? ReflectionMethod { |
|
56 | 56 | /** @var Accessor $accessorAnnotation */ |
57 | 57 | $accessorAnnotation = $annotations->get(Accessor::class); |
58 | 58 | $getters = null !== $accessorAnnotation && null !== $accessorAnnotation->getter() |
@@ -75,7 +75,7 @@ discard block |
||
75 | 75 | ReflectionClass $reflectionClass, |
76 | 76 | ReflectionProperty $reflectionProperty, |
77 | 77 | AnnotationCollection $annotations |
78 | - ): ?ReflectionMethod { |
|
78 | + ): ? ReflectionMethod { |
|
79 | 79 | /** @var Accessor $accessorAnnotation */ |
80 | 80 | $accessorAnnotation = $annotations->get(Accessor::class); |
81 | 81 | $setters = null !== $accessorAnnotation && null !== $accessorAnnotation->setter() |
@@ -93,7 +93,7 @@ discard block |
||
93 | 93 | * @param array $accessors |
94 | 94 | * @return null|ReflectionMethod |
95 | 95 | */ |
96 | - private function reflectionClassMethod(ReflectionClass $reflectionClass, array $accessors): ?ReflectionMethod |
|
96 | + private function reflectionClassMethod(ReflectionClass $reflectionClass, array $accessors): ? ReflectionMethod |
|
97 | 97 | { |
98 | 98 | foreach ($accessors as $method) { |
99 | 99 | if (!$reflectionClass->hasMethod($method)) { |
@@ -4,7 +4,7 @@ discard block |
||
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 | |
@@ -71,7 +71,7 @@ discard block |
||
71 | 71 | * @param string $version |
72 | 72 | * @return Excluder |
73 | 73 | */ |
74 | - public function setVersion(?string $version): Excluder |
|
74 | + public function setVersion(? string $version) : Excluder |
|
75 | 75 | { |
76 | 76 | $this->version = $version; |
77 | 77 |
@@ -4,7 +4,7 @@ discard block |
||
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 | |
@@ -80,7 +80,7 @@ discard block |
||
80 | 80 | |
81 | 81 | $this->write($writer, $var); |
82 | 82 | |
83 | - return (string) $writer; |
|
83 | + return (string)$writer; |
|
84 | 84 | } |
85 | 85 | |
86 | 86 | /** |
@@ -4,7 +4,7 @@ |
||
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 |
@@ -4,7 +4,7 @@ |
||
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 |