Skip to content

Commit e997288

Browse files
committed
PHPStan fixes
1 parent 25d33b0 commit e997288

85 files changed

Lines changed: 214 additions & 193 deletions

File tree

Some content is hidden

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

ci/qa/phpstan.neon

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ includes:
55
- ../../vendor/phpstan/phpstan-symfony/extension.neon
66

77
parameters:
8+
treatPhpDocTypesAsCertain: false
89
level: 9
910
paths:
1011
- ../../src

ci/qa/phpunit

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,5 @@ cd $(dirname $0)/../../
77

88
# PHPUnit Bridge should always be used in Symfony applications. (https://symfony.com/doc/current/components/phpunit_bridge.html)
99
# This will create a phpunit executable in /bin/ instead of /vendor/bin/
10-
./vendor/bin/phpunit --configuration=ci/qa/phpunit.xml --coverage-text --stop-on-error $1
10+
./vendor/bin/phpunit --configuration=ci/qa/phpunit.xml --coverage-text --stop-on-error $@
1111
./vendor/bin/phpunit --configuration=ci/qa/phpunit.xml --testsuite=database

composer.json

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -63,12 +63,12 @@
6363
"moontoast/math": "^1.2.1",
6464
"overtrue/phplint": ">=9.5.6",
6565
"phpmd/phpmd": "^2.15",
66-
"phpstan/phpstan": "^1.11.x-dev",
67-
"phpstan/phpstan-doctrine": "^1.5.7",
68-
"phpstan/phpstan-mockery": "^1.1.3",
69-
"phpstan/phpstan-symfony": "^1.4.13",
66+
"phpstan/phpstan": "^2.0",
67+
"phpstan/phpstan-doctrine": "^2.0",
68+
"phpstan/phpstan-mockery": "^2.0",
69+
"phpstan/phpstan-symfony": "^2.0",
7070
"phpunit/phpunit": "^9.6.22",
71-
"rector/rector": "^1.2",
71+
"rector/rector": "^2.2",
7272
"sebastian/phpcpd": "^6.0.3",
7373
"squizlabs/php_codesniffer": "^3.11.3",
7474
"symfony/browser-kit": "6.4.*",
@@ -101,7 +101,7 @@
101101
"phpcs": "./ci/qa/phpcs",
102102
"phpcbf": "./ci/qa/phpcbf",
103103
"phpcpd": "./ci/qa/phpcpd",
104-
"phpunit": "./ci/qa/phpunit --",
104+
"phpunit": "./ci/qa/phpunit",
105105

106106
"post-install-cmd": [
107107
"Incenteev\\ParameterHandler\\ScriptHandler::buildParameters",

composer.lock

Lines changed: 55 additions & 56 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/Surfnet/Stepup/Configuration/Event/NewInstitutionConfigurationCreatedEvent.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ class NewInstitutionConfigurationCreatedEvent implements SerializableInterface
3838
{
3939

4040
/**
41-
* @SuppressWarnings(PHPMD.ExcessiveParameterList)
41+
* @SuppressWarnings("PHPMD.ExcessiveParameterList")
4242
*/
4343
public function __construct(
4444
public InstitutionConfigurationId $institutionConfigurationId,

src/Surfnet/Stepup/Configuration/InstitutionConfiguration.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -70,11 +70,11 @@
7070
* the aggregate but by playing the events onto the aggregate.
7171
* 2. If one of the configuration options should be nullable, take a look at the applyUseRaOptionChangedEvent doc block
7272
*
73-
* @SuppressWarnings(PHPMD.CouplingBetweenObjects) Events and value objects
74-
* @SuppressWarnings(PHPMD.TooManyMethods) AggregateRoot
75-
* @SuppressWarnings(PHPMD.TooManyPublicMethods) AggregateRoot
76-
* @SuppressWarnings(PHPMD.ExcessiveClassComplexity) AggregateRoot
77-
* @SuppressWarnings(PHPMD.TooManyFields) AggregateRoot
73+
* @SuppressWarnings("PHPMD.CouplingBetweenObjects") Events and value objects
74+
* @SuppressWarnings("PHPMD.TooManyMethods") AggregateRoot
75+
* @SuppressWarnings("PHPMD.TooManyPublicMethods") AggregateRoot
76+
* @SuppressWarnings("PHPMD.ExcessiveClassComplexity") AggregateRoot
77+
* @SuppressWarnings("PHPMD.TooManyFields") AggregateRoot
7878
*/
7979
class InstitutionConfiguration extends EventSourcedAggregateRoot implements InstitutionConfigurationInterface
8080
{
@@ -669,7 +669,7 @@ protected function applyRaLocationRemovedEvent(RaLocationRemovedEvent $event): v
669669
}
670670

671671
/**
672-
* @SuppressWarnings(PHPMD.UnusedFormalParameter)
672+
* @SuppressWarnings("PHPMD.UnusedFormalParameter")
673673
*/
674674
protected function applyInstitutionConfigurationRemovedEvent(InstitutionConfigurationRemovedEvent $event): void
675675
{

src/Surfnet/Stepup/DateTime/DateTime.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@
2525
use TypeError;
2626

2727
/**
28-
* @SuppressWarnings(PHPMD.TooManyMethods)
29-
* @SuppressWarnings(PHPMD.TooManyPublicMethods)
28+
* @SuppressWarnings("PHPMD.TooManyMethods")
29+
* @SuppressWarnings("PHPMD.TooManyPublicMethods")
3030
*/
3131
class DateTime implements Stringable
3232
{

src/Surfnet/Stepup/Identity/Api/Identity.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ public function verifyEmail(string $verificationNonce): void;
125125
* Attempts to vet another identity's verified second factor.
126126
*
127127
*
128-
* @SuppressWarnings(PHPMD.ExcessiveParameterList)
128+
* @SuppressWarnings("PHPMD.ExcessiveParameterList")
129129
*/
130130
public function vetSecondFactor(
131131
Identity $registrant,

0 commit comments

Comments
 (0)