diff --git a/.github/workflows/phpstan.yml b/.github/workflows/phpstan.yml new file mode 100644 index 0000000..7755d8c --- /dev/null +++ b/.github/workflows/phpstan.yml @@ -0,0 +1,39 @@ +name: PHPStan + +on: + push: + branches: + - "*" + pull_request: + branches: [ 'master' ] + +jobs: + run: + name: PHPStan + runs-on: 'ubuntu-latest' + strategy: + matrix: + level: [ 0 ] + include: + - current-level: 0 + steps: + - uses: actions/checkout@v4 + + - name: Setup PHP + uses: shivammathur/setup-php@v2 + with: + php-version: '8.3' + + - name: Install PHPStan + run: composer require --dev phpstan/phpstan + + - name: Run PHPStan + if: matrix.level == matrix.current-level + run: ./vendor/bin/phpstan analyse --memory-limit 1G File tests --level "${{ matrix.level }}" + + - name: Run PHPStan + if: matrix.level > matrix.current-level + continue-on-error: true + run: | + ./vendor/bin/phpstan analyse --memory-limit 1G File tests --level "${{ matrix.level }}" + exit 0 diff --git a/File/IMC.php b/File/IMC.php index f79b5e6..447a31e 100644 --- a/File/IMC.php +++ b/File/IMC.php @@ -98,6 +98,7 @@ class File_IMC const ERROR_INVALID_VCARD_VERSION = 103; const ERROR_PARAM_NOT_SET = 104; const ERROR_INVALID_ITERATION = 105; + const ERROR_INVALID_PARAM_TYPE = 106; /** * Constants for File_IMC vCard "N" component positions.