Skip to content

Commit 49af5f2

Browse files
committed
Upgrade coding-standard
1 parent 52ee0d4 commit 49af5f2

File tree

6 files changed

+10
-31
lines changed

6 files changed

+10
-31
lines changed

composer.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,14 +22,14 @@
2222
"require-dev": {
2323
"infection/infection": "^0.13",
2424
"laminas/laminas-diactoros": "^2.2",
25-
"lcobucci/coding-standard": "^3.0",
25+
"lcobucci/coding-standard": "^4.0",
2626
"phpstan/extension-installer": "^1.0",
2727
"phpstan/phpstan": "^0.12",
2828
"phpstan/phpstan-deprecation-rules": "^0.12",
2929
"phpstan/phpstan-phpunit": "^0.12",
3030
"phpstan/phpstan-strict-rules": "^0.12",
3131
"phpunit/phpunit": "^8.2",
32-
"squizlabs/php_codesniffer": "^3.4"
32+
"squizlabs/php_codesniffer": "^3.5"
3333
},
3434
"autoload": {
3535
"psr-4": {

src/ErrorConversionMiddleware.php

Lines changed: 3 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -24,20 +24,9 @@ final class ErrorConversionMiddleware implements MiddlewareInterface
2424

2525
private const STATUS_URL = 'https://httpstatuses.com/';
2626

27-
/**
28-
* @var ResponseFactoryInterface
29-
*/
30-
private $responseFactory;
31-
32-
/**
33-
* @var DebugInfoStrategy
34-
*/
35-
private $debugInfoStrategy;
36-
37-
/**
38-
* @var StatusCodeExtractionStrategy
39-
*/
40-
private $statusCodeExtractor;
27+
private ResponseFactoryInterface $responseFactory;
28+
private DebugInfoStrategy $debugInfoStrategy;
29+
private StatusCodeExtractionStrategy $statusCodeExtractor;
4130

4231
public function __construct(
4332
ResponseFactoryInterface $responseFactory,

src/ErrorLoggingMiddleware.php

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,7 @@
1212

1313
final class ErrorLoggingMiddleware implements MiddlewareInterface
1414
{
15-
/**
16-
* @var LoggerInterface
17-
*/
18-
private $logger;
15+
private LoggerInterface $logger;
1916

2017
public function __construct(LoggerInterface $logger)
2118
{

src/StatusCodeExtractionStrategy/ClassMap.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ final class ClassMap implements StatusCodeExtractionStrategy
2424
/**
2525
* @var array<string, int>
2626
*/
27-
private $conversionMap;
27+
private array $conversionMap;
2828

2929
/**
3030
* @param array<string, int> $conversionMap

tests/ErrorConversionMiddlewareTest.php

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -29,15 +29,8 @@
2929
*/
3030
final class ErrorConversionMiddlewareTest extends TestCase
3131
{
32-
/**
33-
* @var ResponseFactory
34-
*/
35-
private $responseFactory;
36-
37-
/**
38-
* @var ClassMap
39-
*/
40-
private $statusCodeExtractor;
32+
private ResponseFactory $responseFactory;
33+
private ClassMap $statusCodeExtractor;
4134

4235
/**
4336
* @before

tests/ErrorLoggingMiddlewareTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ final class ErrorLoggingMiddlewareTest extends TestCase
2020
/**
2121
* @var LoggerInterface&MockObject
2222
*/
23-
private $logger;
23+
private LoggerInterface $logger;
2424

2525
/**
2626
* @before

0 commit comments

Comments
 (0)