diff --git a/.github/workflows/php.yml b/.github/workflows/php.yml index b610b41..33eb815 100644 --- a/.github/workflows/php.yml +++ b/.github/workflows/php.yml @@ -115,7 +115,7 @@ jobs: uses: shivammathur/setup-php@v2 with: php-version: ${{ matrix.php-versions }} - extensions: ctype, date, dom, fileinfo, filter, hash, intl, mbstring, openssl, pcre, posix, spl, xml + extensions: ctype, date, dom, fileinfo, filter, hash, intl, mbstring, openssl, pcre, posix, spl, xml, zip tools: composer ini-values: error_reporting=E_ALL coverage: none @@ -161,9 +161,8 @@ jobs: with: # Should be the higest supported version, so we can use the newest tools php-version: '8.4' - tools: composer, composer-require-checker, composer-unused, phpcs, psalm - # optional performance gain for psalm: opcache - extensions: ctype, date, dom, fileinfo, filter, hash, intl, mbstring, opcache, openssl, pcre, posix, spl, xml + tools: composer, composer-require-checker, composer-unused, phpcs, phpstan + extensions: ctype, date, dom, fileinfo, filter, hash, intl, mbstring, openssl, pcre, posix, spl, xml - name: Setup problem matchers for PHP run: echo "::add-matcher::${{ runner.tool_cache }}/php.json" @@ -195,27 +194,13 @@ jobs: - name: PHP Code Sniffer run: phpcs - - name: Psalm - continue-on-error: true - run: | - psalm -c psalm.xml \ - --show-info=true \ - --shepherd \ - --php-version=${{ steps.setup-php.outputs.php-version }} - - - name: Psalm (testsuite) + - name: PHPStan run: | - psalm -c psalm-dev.xml \ - --show-info=true \ - --shepherd \ - --php-version=${{ steps.setup-php.outputs.php-version }} + vendor/bin/phpstan analyze -c phpstan.neon - - name: Psalter + - name: PHPStan (testsuite) run: | - psalm --alter \ - --issues=UnnecessaryVarAnnotation \ - --dry-run \ - --php-version=${{ steps.setup-php.outputs.php-version }} + vendor/bin/phpstan analyze -c phpstan-dev.neon security: name: Security checks diff --git a/phpstan-dev.neon b/phpstan-dev.neon new file mode 100644 index 0000000..4d29b8b --- /dev/null +++ b/phpstan-dev.neon @@ -0,0 +1,4 @@ +parameters: + level: 9 + paths: + - tests diff --git a/phpstan.neon b/phpstan.neon new file mode 100644 index 0000000..db37782 --- /dev/null +++ b/phpstan.neon @@ -0,0 +1,4 @@ +parameters: + level: 6 + paths: + - src diff --git a/psalm-dev.xml b/psalm-dev.xml deleted file mode 100644 index 95c5632..0000000 --- a/psalm-dev.xml +++ /dev/null @@ -1,18 +0,0 @@ - - - - - - - - - - - diff --git a/psalm.xml b/psalm.xml deleted file mode 100644 index 4ea5604..0000000 --- a/psalm.xml +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/Auth/Process/EntityCategory.php b/src/Auth/Process/EntityCategory.php index 82d8759..4e616f3 100644 --- a/src/Auth/Process/EntityCategory.php +++ b/src/Auth/Process/EntityCategory.php @@ -27,7 +27,7 @@ class EntityCategory extends Auth\ProcessingFilter * A list of categories available. An associative array where the identifier of the category is the key, and the * associated value is an array with all the attributes allowed for services in that category. * - * @var array + * @var array> */ protected array $categories = []; @@ -63,7 +63,7 @@ class EntityCategory extends Auth\ProcessingFilter /** * EntityCategory constructor. * - * @param array $config An array with the configuration for this processing filter. + * @param array $config An array with the configuration for this processing filter. * @param mixed $reserved For future use. * @throws \SimpleSAML\Error\ConfigurationError In case of a misconfiguration of the filter. */ @@ -122,7 +122,7 @@ public function __construct(array $config, $reserved) /** * Apply the filter to modify the list of attributes for the current service provider. * - * @param array &$state The current request. + * @param array &$state The current request. */ public function process(array &$state): void {