Skip to content
This repository was archived by the owner on Jul 6, 2024. It is now read-only.

Commit 453f222

Browse files
author
Dominik Zogg
committed
update require-dev
1 parent b5fe8ce commit 453f222

27 files changed

+116
-197
lines changed

.php_cs renamed to .php-cs-fixer.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,9 @@
1212
/** @var array $config */
1313
$config = require __DIR__ . '/vendor/chubbyphp/chubbyphp-dev-helper/phpcs.php';
1414

15-
return PhpCsFixer\Config::create()
15+
$config['rules']['final_public_method_for_abstract_class'] = false;
16+
17+
return (new PhpCsFixer\Config)
1618
->setIndent($config['indent'])
1719
->setLineEnding($config['lineEnding'])
1820
->setRules($config['rules'])

composer.json

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -20,18 +20,18 @@
2020
"psr/log": "^1.1.3"
2121
},
2222
"require-dev": {
23-
"chubbyphp/chubbyphp-container": "^1.1|^2.0",
23+
"chubbyphp/chubbyphp-container": "^1.4|^2.0",
2424
"chubbyphp/chubbyphp-dev-helper": "dev-master",
25-
"chubbyphp/chubbyphp-laminas-config-factory": "^1.0",
25+
"chubbyphp/chubbyphp-laminas-config-factory": "^1.1.1",
2626
"chubbyphp/chubbyphp-mock": "^1.6",
27-
"infection/infection": "^0.20.2",
27+
"infection/infection": "^0.25.2",
2828
"php-coveralls/php-coveralls": "^2.4.3",
2929
"phploc/phploc": "^7.0.2",
3030
"phpstan/extension-installer": "^1.1",
31-
"phpstan/phpstan": "^0.12.64",
32-
"phpunit/phpunit": "^9.5",
33-
"pimple/pimple": "^3.3",
34-
"psr/container": "^1.0|^2.0"
31+
"phpstan/phpstan": "^0.12.99",
32+
"phpunit/phpunit": "^9.5.10",
33+
"pimple/pimple": "^3.4",
34+
"psr/container": "^1.1.1|^2.0.1"
3535
},
3636
"autoload": {
3737
"psr-4": { "Chubbyphp\\ApiHttp\\": "src/" }

src/ApiProblem/AbstractApiProblem.php

Lines changed: 5 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -6,30 +6,15 @@
66

77
abstract class AbstractApiProblem implements ApiProblemInterface
88
{
9-
/**
10-
* @var string
11-
*/
12-
protected $type;
9+
protected string $type;
1310

14-
/**
15-
* @var int
16-
*/
17-
protected $status;
11+
protected int $status;
1812

19-
/**
20-
* @var string
21-
*/
22-
protected $title;
13+
protected string $title;
2314

24-
/**
25-
* @var string|null
26-
*/
27-
protected $detail;
15+
protected ?string $detail;
2816

29-
/**
30-
* @var string|null
31-
*/
32-
protected $instance;
17+
protected ?string $instance;
3318

3419
public function __construct(
3520
string $type,

src/ApiProblem/ClientError/BadRequest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ final class BadRequest extends AbstractApiProblem
1111
/**
1212
* @var array<int, array<mixed>>
1313
*/
14-
private $invalidParameters = [];
14+
private array $invalidParameters = [];
1515

1616
/**
1717
* @param array<int, array<mixed>> $invalidParameters

src/ApiProblem/ClientError/ExpectationFailed.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ final class ExpectationFailed extends AbstractApiProblem
1111
/**
1212
* @var array<int, string>
1313
*/
14-
private $failedExpectations = [];
14+
private array $failedExpectations = [];
1515

1616
/**
1717
* @param array<int, string> $failedExpectations

src/ApiProblem/ClientError/MethodNotAllowed.php

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,12 @@
88

99
final class MethodNotAllowed extends AbstractApiProblem
1010
{
11-
/**
12-
* @var string
13-
*/
14-
private $method;
11+
private string $method;
1512

1613
/**
1714
* @var array<int, string>
1815
*/
19-
private $allowedMethods = [];
16+
private array $allowedMethods = [];
2017

2118
/**
2219
* @param string $method,

src/ApiProblem/ClientError/NotAcceptable.php

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,12 @@
88

99
final class NotAcceptable extends AbstractApiProblem
1010
{
11-
/**
12-
* @var string
13-
*/
14-
private $accept;
11+
private string $accept;
1512

1613
/**
1714
* @var array<int, string>
1815
*/
19-
private $acceptables = [];
16+
private array $acceptables = [];
2017

2118
/**
2219
* @param array<int, string> $acceptables

src/ApiProblem/ClientError/PaymentRequired.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ final class PaymentRequired extends AbstractApiProblem
1111
/**
1212
* @var array<int, string>
1313
*/
14-
private $paymentTypes = [];
14+
private array $paymentTypes = [];
1515

1616
/**
1717
* @param array<int, string> $paymentTypes

src/ApiProblem/ClientError/PreconditionFailed.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ final class PreconditionFailed extends AbstractApiProblem
1111
/**
1212
* @var array<int, string>
1313
*/
14-
private $failedPreconditions = [];
14+
private array $failedPreconditions = [];
1515

1616
/**
1717
* @param array<int, string> $failedPreconditions

src/ApiProblem/ClientError/RequestEntityTooLarge.php

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

99
final class RequestEntityTooLarge extends AbstractApiProblem
1010
{
11-
/**
12-
* @var int
13-
*/
14-
private $maxContentLength;
11+
private int $maxContentLength;
1512

1613
public function __construct(int $maxContentLength, ?string $detail = null, ?string $instance = null)
1714
{

0 commit comments

Comments
 (0)