Skip to content

Commit 90e8976

Browse files
committed
Update build-cs
1 parent 2f736a6 commit 90e8976

File tree

55 files changed

+107
-174
lines changed

Some content is hidden

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

55 files changed

+107
-174
lines changed

.github/workflows/build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ jobs:
5656
with:
5757
repository: "phpstan/build-cs"
5858
path: "build-cs"
59-
ref: "1.x"
59+
ref: "2.x"
6060

6161
- name: "Install PHP"
6262
uses: "shivammathur/setup-php@v2"

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ lint:
1313
.PHONY: cs-install
1414
cs-install:
1515
git clone https://github.com/phpstan/build-cs.git || true
16-
git -C build-cs fetch origin && git -C build-cs reset --hard origin/1.x
16+
git -C build-cs fetch origin && git -C build-cs reset --hard origin/2.x
1717
composer install --working-dir build-cs
1818

1919
.PHONY: cs

src/Rules/Symfony/ContainerInterfacePrivateServiceRule.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,7 @@
1919
final class ContainerInterfacePrivateServiceRule implements Rule
2020
{
2121

22-
/** @var ServiceMap */
23-
private $serviceMap;
22+
private ServiceMap $serviceMap;
2423

2524
public function __construct(ServiceMap $symfonyServiceMap)
2625
{

src/Rules/Symfony/ContainerInterfaceUnknownServiceRule.php

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,9 @@
1919
final class ContainerInterfaceUnknownServiceRule implements Rule
2020
{
2121

22-
/** @var ServiceMap */
23-
private $serviceMap;
22+
private ServiceMap $serviceMap;
2423

25-
/** @var Standard */
26-
private $printer;
24+
private Standard $printer;
2725

2826
public function __construct(ServiceMap $symfonyServiceMap, Standard $printer)
2927
{

src/Rules/Symfony/InvalidArgumentDefaultValueRule.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ public function processNode(Node $node, Scope $scope): array
6262
return [
6363
RuleErrorBuilder::message(sprintf(
6464
'Parameter #4 $default of method Symfony\Component\Console\Command\Command::addArgument() expects string|null, %s given.',
65-
$defaultType->describe(VerbosityLevel::typeOnly())
65+
$defaultType->describe(VerbosityLevel::typeOnly()),
6666
))->identifier('argument.type')->build(),
6767
];
6868
}
@@ -72,7 +72,7 @@ public function processNode(Node $node, Scope $scope): array
7272
return [
7373
RuleErrorBuilder::message(sprintf(
7474
'Parameter #4 $default of method Symfony\Component\Console\Command\Command::addArgument() expects array<int, string>|null, %s given.',
75-
$defaultType->describe(VerbosityLevel::typeOnly())
75+
$defaultType->describe(VerbosityLevel::typeOnly()),
7676
))->identifier('argument.type')->build(),
7777
];
7878
}

src/Rules/Symfony/InvalidOptionDefaultValueRule.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ public function processNode(Node $node, Scope $scope): array
6767
RuleErrorBuilder::message(sprintf(
6868
'Parameter #5 $default of method Symfony\Component\Console\Command\Command::addOption() expects %s, %s given.',
6969
$checkType->describe(VerbosityLevel::typeOnly()),
70-
$defaultType->describe(VerbosityLevel::typeOnly())
70+
$defaultType->describe(VerbosityLevel::typeOnly()),
7171
))->identifier('argument.type')->build(),
7272
];
7373
}
@@ -78,7 +78,7 @@ public function processNode(Node $node, Scope $scope): array
7878
return [
7979
RuleErrorBuilder::message(sprintf(
8080
'Parameter #5 $default of method Symfony\Component\Console\Command\Command::addOption() expects array<string>|null, %s given.',
81-
$defaultType->describe(VerbosityLevel::typeOnly())
81+
$defaultType->describe(VerbosityLevel::typeOnly()),
8282
))->identifier('argument.type')->build(),
8383
];
8484
}

src/Rules/Symfony/UndefinedArgumentRule.php

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,9 @@
2222
final class UndefinedArgumentRule implements Rule
2323
{
2424

25-
/** @var ConsoleApplicationResolver */
26-
private $consoleApplicationResolver;
25+
private ConsoleApplicationResolver $consoleApplicationResolver;
2726

28-
/** @var Standard */
29-
private $printer;
27+
private Standard $printer;
3028

3129
public function __construct(ConsoleApplicationResolver $consoleApplicationResolver, Standard $printer)
3230
{

src/Rules/Symfony/UndefinedOptionRule.php

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,9 @@
2222
final class UndefinedOptionRule implements Rule
2323
{
2424

25-
/** @var ConsoleApplicationResolver */
26-
private $consoleApplicationResolver;
25+
private ConsoleApplicationResolver $consoleApplicationResolver;
2726

28-
/** @var Standard */
29-
private $printer;
27+
private Standard $printer;
3028

3129
public function __construct(ConsoleApplicationResolver $consoleApplicationResolver, Standard $printer)
3230
{

src/Symfony/Configuration.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ final class Configuration
66
{
77

88
/** @var array<string, mixed> */
9-
private $parameters;
9+
private array $parameters;
1010

1111
/**
1212
* @param array<string, mixed> $parameters

src/Symfony/ConsoleApplicationResolver.php

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,9 @@
1616
final class ConsoleApplicationResolver
1717
{
1818

19-
/** @var string|null */
20-
private $consoleApplicationLoader;
19+
private ?string $consoleApplicationLoader = null;
2120

22-
/** @var Application|null */
23-
private $consoleApplication;
21+
private ?Application $consoleApplication = null;
2422

2523
public function __construct(Configuration $configuration)
2624
{

0 commit comments

Comments
 (0)