Skip to content

Commit e0d2141

Browse files
committed
Fix PHPstan-issues (src)
1 parent ad23c9f commit e0d2141

31 files changed

Lines changed: 84 additions & 329 deletions

.github/workflows/php.yml

Lines changed: 5 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ jobs:
166166
uses: shivammathur/setup-php@v2
167167
with:
168168
php-version: '8.5'
169-
tools: composer, psalm
169+
tools: composer
170170
extensions: mbstring, soap, xml
171171
coverage: none
172172

@@ -204,30 +204,13 @@ jobs:
204204
- name: PHP Code Sniffer
205205
run: vendor/bin/phpcs
206206

207-
- name: Psalm
208-
continue-on-error: true
209-
run: |
210-
psalm \
211-
-c psalm.xml \
212-
--show-info=true \
213-
--shepherd \
214-
--php-version=${{ steps.setup-php.outputs.php-version }}
215-
216-
- name: Psalm (testsuite)
217-
continue-on-error: true
207+
- name: PHPStan
218208
run: |
219-
psalm \
220-
-c psalm-dev.xml \
221-
--show-info=true \
222-
--shepherd \
223-
--php-version=${{ steps.setup-php.outputs.php-version }}
209+
vendor/bin/phpstan analyze -c phpstan.neon
224210
225-
- name: Psalter
211+
- name: PHPStan (testsuite)
226212
run: |
227-
psalm --alter \
228-
--issues=UnnecessaryVarAnnotation \
229-
--dry-run \
230-
--php-version=${{ steps.setup-php.outputs.php-version }}
213+
vendor/bin/phpstan analyze -c phpstan-dev.neon
231214
232215
- name: Check for unused translations
233216
continue-on-error: true

composer.lock

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

phpstan-dev.neon

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
parameters:
2+
level: 3
3+
paths:
4+
- tests
5+
#includes:
6+
# - phpstan-baseline-dev.neon

phpstan.neon

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
parameters:
2+
level: 3
3+
paths:
4+
- src
5+
#includes:
6+
# - phpstan-baseline.neon

psalm-dev.xml

Lines changed: 0 additions & 179 deletions
This file was deleted.

psalm.xml

Lines changed: 0 additions & 83 deletions
This file was deleted.

src/SimpleSAML/Auth/ProcessingChain.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -326,7 +326,6 @@ public static function fetchProcessedState(string $id): ?array
326326

327327
/**
328328
* @param array $state
329-
* @psalm-param array{"\\\SimpleSAML\\\Auth\\\ProcessingChain.filters": array} $state
330329
* @param \SimpleSAML\Auth\ProcessingFilter[] $authProcs
331330
*/
332331
public static function insertFilters(array &$state, array $authProcs): void
@@ -347,7 +346,6 @@ public static function insertFilters(array &$state, array $authProcs): void
347346

348347
/**
349348
* @param array $state
350-
* @psalm-param array{"\\\SimpleSAML\\\Auth\\\ProcessingChain.filters": array} $state
351349
* @param array $authProcConfigs
352350
* @return \SimpleSAML\Auth\ProcessingFilter[]
353351
*/

src/SimpleSAML/Auth/ProcessingFilter.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ abstract class ProcessingFilter
5050
*
5151
* @param array &$config Configuration for this filter.
5252
* @param mixed $reserved For future use.
53+
* @phpstan-ignore constructor.unusedParameter
5354
*/
5455
public function __construct(array &$config, /** @scrutinizer ignore-unused */ $reserved)
5556
{

src/SimpleSAML/Auth/Source.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ abstract class Source
3939
*
4040
* @param array $info Information about this authentication source.
4141
* @param array &$config Configuration for this authentication source.
42+
* @phpstan-ignore constructor.unusedParameter
4243
*/
4344
public function __construct(array $info, array &$config)
4445
{

0 commit comments

Comments
 (0)