@@ -36,7 +36,7 @@ |
||
36 | 36 | * Factory constructor that handles nulls |
37 | 37 | * |
38 | 38 | * @param mixed $value |
39 | - * @return JsonNull|JsonPrimitive |
|
39 | + * @return JsonElement |
|
40 | 40 | */ |
41 | 41 | public static function create($value) |
42 | 42 | { |
@@ -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 | namespace Tebru\Gson\Element; |
9 | 9 | |
10 | 10 | /** |
@@ -22,7 +22,7 @@ |
||
22 | 22 | * Read the next value, convert it to its type and return it |
23 | 23 | * |
24 | 24 | * @param JsonReadable $reader |
25 | - * @return mixed |
|
25 | + * @return null|boolean |
|
26 | 26 | */ |
27 | 27 | public function read(JsonReadable $reader): ?bool |
28 | 28 | { |
@@ -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 | namespace Tebru\Gson\Internal\TypeAdapter; |
9 | 9 | |
10 | 10 | use Tebru\Gson\JsonWritable; |
@@ -25,7 +25,7 @@ discard block |
||
25 | 25 | * @param JsonReadable $reader |
26 | 26 | * @return mixed |
27 | 27 | */ |
28 | - public function read(JsonReadable $reader): ?bool |
|
28 | + public function read(JsonReadable $reader): ? bool |
|
29 | 29 | { |
30 | 30 | if ($reader->peek() === JsonToken::NULL) { |
31 | 31 | return $reader->nextNull(); |
@@ -49,6 +49,6 @@ discard block |
||
49 | 49 | return; |
50 | 50 | } |
51 | 51 | |
52 | - $writer->writeBoolean((bool)$value); |
|
52 | + $writer->writeBoolean((bool) $value); |
|
53 | 53 | } |
54 | 54 | } |
@@ -22,7 +22,7 @@ |
||
22 | 22 | * Read the next value, convert it to its type and return it |
23 | 23 | * |
24 | 24 | * @param JsonReadable $reader |
25 | - * @return mixed |
|
25 | + * @return null|string |
|
26 | 26 | */ |
27 | 27 | public function read(JsonReadable $reader): ?string |
28 | 28 | { |
@@ -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 | namespace Tebru\Gson\Internal\TypeAdapter; |
9 | 9 | |
10 | 10 | use Tebru\Gson\JsonWritable; |
@@ -25,7 +25,7 @@ discard block |
||
25 | 25 | * @param JsonReadable $reader |
26 | 26 | * @return mixed |
27 | 27 | */ |
28 | - public function read(JsonReadable $reader): ?string |
|
28 | + public function read(JsonReadable $reader): ? string |
|
29 | 29 | { |
30 | 30 | if ($reader->peek() === JsonToken::NULL) { |
31 | 31 | return $reader->nextNull(); |
@@ -49,6 +49,6 @@ discard block |
||
49 | 49 | return; |
50 | 50 | } |
51 | 51 | |
52 | - $writer->writeString((string)$value); |
|
52 | + $writer->writeString((string) $value); |
|
53 | 53 | } |
54 | 54 | } |
@@ -94,6 +94,7 @@ |
||
94 | 94 | * Sets whether nulls are serialized |
95 | 95 | * |
96 | 96 | * @param bool $serializeNull |
97 | + * @return void |
|
97 | 98 | */ |
98 | 99 | public function setSerializeNull(bool $serializeNull): void; |
99 | 100 | } |
@@ -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 | namespace Tebru\Gson; |
9 | 9 | |
10 | 10 | /** |
@@ -28,7 +28,7 @@ |
||
28 | 28 | * Read the next value, convert it to its type and return it |
29 | 29 | * |
30 | 30 | * @param JsonReadable $reader |
31 | - * @return mixed |
|
31 | + * @return JsonElement |
|
32 | 32 | * @throws \LogicException |
33 | 33 | */ |
34 | 34 | public function read(JsonReadable $reader): JsonElement |
@@ -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 | namespace Tebru\Gson\Internal\TypeAdapter; |
9 | 9 | |
10 | 10 | use LogicException; |
@@ -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 | namespace Tebru\Gson; |
9 | 9 | |
10 | 10 | use Tebru\Gson\Internal\TypeAdapterProvider; |
@@ -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);namespace Tebru\Gson; |
|
7 | +declare(strict_types = 1); namespace Tebru\Gson; |
|
8 | 8 | |
9 | 9 | use Tebru\Gson\Internal\Data\AnnotationSet; |
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 | namespace Tebru\Gson; |
9 | 9 | |
10 | 10 | use Tebru\Gson\Element\JsonElement; |
@@ -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 | namespace Tebru\Gson\Internal\Naming; |
9 | 9 | |
10 | 10 | use Tebru\Gson\PropertyNamingStrategy; |