@@ -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\Retrofit\Internal\AnnotationHandler; |
10 | 10 | |
@@ -37,7 +37,7 @@ discard block |
||
37 | 37 | ServiceMethodBuilder $serviceMethodBuilder, |
38 | 38 | ?Converter $converter, |
39 | 39 | ?int $index |
40 | - ): void { |
|
40 | + ) : void { |
|
41 | 41 | $serviceMethodBuilder->addParameterHandler( |
42 | 42 | $index, |
43 | 43 | new QueryNameParamHandler($converter, $annotation->isEncoded()) |
@@ -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\Retrofit\Internal\AnnotationHandler; |
10 | 10 | |
@@ -34,7 +34,7 @@ discard block |
||
34 | 34 | ServiceMethodBuilder $serviceMethodBuilder, |
35 | 35 | ?Converter $converter, |
36 | 36 | ?int $index |
37 | - ): void { |
|
37 | + ) : void { |
|
38 | 38 | /** @var string[] $headerList */ |
39 | 39 | $headerList = $annotation->getValue(); |
40 | 40 | foreach ($headerList as $name => $header) { |
@@ -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\Retrofit\Internal\AnnotationHandler; |
10 | 10 | |
@@ -36,7 +36,7 @@ discard block |
||
36 | 36 | ServiceMethodBuilder $serviceMethodBuilder, |
37 | 37 | ?Converter $converter, |
38 | 38 | ?int $index |
39 | - ): void { |
|
39 | + ) : void { |
|
40 | 40 | $serviceMethodBuilder->setIsJson(); |
41 | 41 | $serviceMethodBuilder->addParameterHandler($index, new BodyParamHandler($converter)); |
42 | 42 | } |
@@ -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\Retrofit\Internal\AnnotationHandler; |
10 | 10 | |
@@ -37,7 +37,7 @@ discard block |
||
37 | 37 | ServiceMethodBuilder $serviceMethodBuilder, |
38 | 38 | ?Converter $converter, |
39 | 39 | ?int $index |
40 | - ): void { |
|
40 | + ) : void { |
|
41 | 41 | $serviceMethodBuilder->setIsMultipart(); |
42 | 42 | $serviceMethodBuilder->addParameterHandler( |
43 | 43 | $index, |
@@ -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\Retrofit\Internal\AnnotationHandler; |
10 | 10 | |
@@ -37,7 +37,7 @@ discard block |
||
37 | 37 | ServiceMethodBuilder $serviceMethodBuilder, |
38 | 38 | ?Converter $converter, |
39 | 39 | ?int $index |
40 | - ): void { |
|
40 | + ) : void { |
|
41 | 41 | $serviceMethodBuilder->addParameterHandler( |
42 | 42 | $index, |
43 | 43 | new QueryParamHandler($converter, $annotation->getValue(), $annotation->isEncoded()) |
@@ -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\Retrofit\Internal\ParameterHandler; |
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\Retrofit\Internal\ParameterHandler; |
10 | 10 | |
@@ -36,7 +36,7 @@ discard block |
||
36 | 36 | */ |
37 | 37 | protected function getListValues($list): Generator |
38 | 38 | { |
39 | - foreach ((array)$list as $key => $element) { |
|
39 | + foreach ((array) $list as $key => $element) { |
|
40 | 40 | if (!is_int($key)) { |
41 | 41 | throw new RuntimeException('Retrofit: Array value must use numeric keys'); |
42 | 42 | } |
@@ -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\Retrofit\Internal; |
10 | 10 | |
@@ -165,7 +165,7 @@ discard block |
||
165 | 165 | $reflectionTypeName = '\\'.$reflectionTypeName; |
166 | 166 | } |
167 | 167 | |
168 | - $type = $reflectionParameter->getType()->allowsNull() ? new NullableType($reflectionTypeName): $reflectionTypeName; |
|
168 | + $type = $reflectionParameter->getType()->allowsNull() ? new NullableType($reflectionTypeName) : $reflectionTypeName; |
|
169 | 169 | $paramBuilder->setTypeHint($type); |
170 | 170 | |
171 | 171 | if ($reflectionParameter->isPassedByReference()) { |
@@ -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\Retrofit\Internal\ServiceMethod; |
10 | 10 | |
@@ -153,8 +153,8 @@ discard block |
||
153 | 153 | { |
154 | 154 | if ($this->hasBody !== null && $this->hasBody !== $hasBody) { |
155 | 155 | throw new LogicException( |
156 | - 'Retrofit: Body cannot be changed after it has been set. This indicates a conflict between ' . |
|
157 | - 'HTTP Request annotations, body annotations, and request type annotations. For example, ' . |
|
156 | + 'Retrofit: Body cannot be changed after it has been set. This indicates a conflict between '. |
|
157 | + 'HTTP Request annotations, body annotations, and request type annotations. For example, '. |
|
158 | 158 | '@GET cannot be used with @Body, @Field, or @Part annotations' |
159 | 159 | ); |
160 | 160 | } |
@@ -176,8 +176,8 @@ discard block |
||
176 | 176 | { |
177 | 177 | if ($this->contentType !== null && $this->contentType !== $contentType) { |
178 | 178 | throw new LogicException( |
179 | - 'Retrofit: Content type cannot be changed after it has been set. This indicates a conflict between ' . |
|
180 | - 'HTTP Request annotations, body annotations, and request type annotations. For example, ' . |
|
179 | + 'Retrofit: Content type cannot be changed after it has been set. This indicates a conflict between '. |
|
180 | + 'HTTP Request annotations, body annotations, and request type annotations. For example, '. |
|
181 | 181 | '@GET cannot be used with @Body, @Field, or @Part annotations' |
182 | 182 | ); |
183 | 183 | } |
@@ -325,15 +325,15 @@ discard block |
||
325 | 325 | |
326 | 326 | if ($this->hasBody === true && $this->contentType === null) { |
327 | 327 | throw new LogicException( |
328 | - 'Retrofit: Cannot build service method with body and no content type. Set one using @Body, ' . |
|
328 | + 'Retrofit: Cannot build service method with body and no content type. Set one using @Body, '. |
|
329 | 329 | '@Field, or @Part' |
330 | 330 | ); |
331 | 331 | } |
332 | 332 | |
333 | 333 | if ($this->hasBody !== true && $this->contentType !== null) { |
334 | 334 | throw new LogicException( |
335 | - 'Retrofit: Cannot set a content-type without a body. This indicates a conflict between ' . |
|
336 | - 'HTTP Request annotations, body annotations, and request type annotations. For example, ' . |
|
335 | + 'Retrofit: Cannot set a content-type without a body. This indicates a conflict between '. |
|
336 | + 'HTTP Request annotations, body annotations, and request type annotations. For example, '. |
|
337 | 337 | '@GET cannot be used with @Body, @Field, or @Part annotations' |
338 | 338 | ); |
339 | 339 | } |