Skip to content

Commit 78ec0a3

Browse files
canvuralscaytrase
authored andcommitted
Update doctrine/coding-standard to 8.2
1 parent 8e083f4 commit 78ec0a3

File tree

179 files changed

+591
-473
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

179 files changed

+591
-473
lines changed

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
},
3636
"require-dev": {
3737
"cache/array-adapter": "^1.0",
38-
"doctrine/coding-standard": "^6.0",
38+
"doctrine/coding-standard": "^8.0",
3939
"guzzlehttp/psr7": "^1.5",
4040
"phpunit/phpunit": "^7|^8"
4141
},

phpcs.xml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,11 @@
1313
<file>tests</file>
1414

1515
<!-- Include full Doctrine Coding Standard -->
16-
<rule ref="Doctrine"/>
16+
<rule ref="Doctrine">
17+
<exclude name="SlevomatCodingStandard.PHP.RequireExplicitAssertion"/>
18+
19+
// This is only for PHP 7.4 and up
20+
<exclude name="SlevomatCodingStandard.TypeHints.PropertyTypeHint.MissingNativeTypeHint"/>
21+
<exclude name="SlevomatCodingStandard.ControlStructures.RequireNullCoalesceEqualOperator.RequiredNullCoalesceEqualOperator"/>
22+
</rule>
1723
</ruleset>

src/Foundation/ArrayHelper.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ final class ArrayHelper
2020
*
2121
* @param mixed[] $arr
2222
*/
23-
public static function isAssoc(array $arr) : bool
23+
public static function isAssoc(array $arr): bool
2424
{
2525
if ($arr === []) {
2626
return false;

src/PSR15/Exception/InvalidRequestMessage.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
class InvalidRequestMessage extends ValidationFailed
1010
{
11-
public static function because(ValidationFailed $e) : self
11+
public static function because(ValidationFailed $e): self
1212
{
1313
return new static('Request message failed validation', 0, $e);
1414
}

src/PSR15/Exception/InvalidResponseMessage.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
class InvalidResponseMessage extends ValidationFailed
1010
{
11-
public static function because(ValidationFailed $e) : self
11+
public static function because(ValidationFailed $e): self
1212
{
1313
return new static('Response message failed validation', 0, $e);
1414
}

src/PSR15/Exception/InvalidServerRequestMessage.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
class InvalidServerRequestMessage extends ValidationFailed
1010
{
11-
public static function because(ValidationFailed $e) : self
11+
public static function because(ValidationFailed $e): self
1212
{
1313
return new static('Server Request message failed validation', 0, $e);
1414
}

src/PSR15/SlimAdapter.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ public function __construct(MiddlewareInterface $middleware)
2727
$this->middleware = $middleware;
2828
}
2929

30-
public function __invoke(ServerRequestInterface $request, ResponseInterface $response, callable $next) : ResponseInterface
30+
public function __invoke(ServerRequestInterface $request, ResponseInterface $response, callable $next): ResponseInterface
3131
{
3232
$this->response = $response;
3333
$this->next = $next;
@@ -37,7 +37,7 @@ public function __invoke(ServerRequestInterface $request, ResponseInterface $res
3737
return $this->middleware->process($request, $this);
3838
}
3939

40-
public function handle(ServerRequestInterface $request) : ResponseInterface
40+
public function handle(ServerRequestInterface $request): ResponseInterface
4141
{
4242
return ($this->next)($request, $this->response);
4343
}

src/PSR15/ValidationMiddleware.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ public function __construct(ServerRequestValidator $requestValidator, ResponseVa
3434
* If unable to produce the response itself, it may delegate to the provided
3535
* request handler to do so.
3636
*/
37-
public function process(ServerRequestInterface $request, RequestHandlerInterface $handler) : ResponseInterface
37+
public function process(ServerRequestInterface $request, RequestHandlerInterface $handler): ResponseInterface
3838
{
3939
// 1. Validate request
4040
try {

src/PSR15/ValidationMiddlewareBuilder.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
class ValidationMiddlewareBuilder extends ValidatorBuilder
1111
{
12-
public function getValidationMiddleware() : MiddlewareInterface
12+
public function getValidationMiddleware(): MiddlewareInterface
1313
{
1414
return new ValidationMiddleware(
1515
$this->getServerRequestValidator(),

src/PSR7/CacheableSchemaFactory.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,5 @@
66

77
interface CacheableSchemaFactory extends SchemaFactory
88
{
9-
public function getCacheKey() : string;
9+
public function getCacheKey(): string;
1010
}

0 commit comments

Comments
 (0)