diff --git a/.github/workflows/php-package-ci.yml b/.github/workflows/php-package-ci.yml index ffad5e2..0985c72 100644 --- a/.github/workflows/php-package-ci.yml +++ b/.github/workflows/php-package-ci.yml @@ -9,7 +9,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - php: [ 7.1, 7.2, 7.3, 7.4, 8.0 ] + php: [ 7.4, 8.0 ] steps: - uses: actions/checkout@v2 - uses: shivammathur/setup-php@v2 diff --git a/Makefile b/Makefile index f6486d4..001272b 100644 --- a/Makefile +++ b/Makefile @@ -7,7 +7,6 @@ run-tests: ./vendor/bin/phpcs --standard=src/PeckaCodingStandardStrict/ruleset.xml tests/Success/ ./vendor/bin/phpcs --standard=src/PeckaCodingStandard/ruleset.xml tests/Failure/Arrays/TrailingArrayComma.php | tests/errorNumber.sh 1 ./vendor/bin/phpcs --standard=src/PeckaCodingStandard/ruleset.xml tests/Failure/Classes/ClassConstantVisibility.php | tests/errorNumber.sh 1 - ./vendor/bin/phpcs --standard=src/PeckaCodingStandard/ruleset.xml tests/Failure/Classes/UnusedPrivateElements.php | tests/errorNumber.sh 2 ./vendor/bin/phpcs --standard=src/PeckaCodingStandard/ruleset.xml tests/Failure/Classes/PropertySpacing.php | tests/errorNumber.sh 2 ./vendor/bin/phpcs --standard=src/PeckaCodingStandard/ruleset.xml tests/Failure/Classes/MethodSpacingSniff.php | tests/errorNumber.sh 2 ./vendor/bin/phpcs --standard=src/PeckaCodingStandard/ruleset.xml tests/Failure/Classes/ClassMemberSpacing.php | tests/errorNumber.sh 1 diff --git a/composer.json b/composer.json index a8cb6d4..9ab5c50 100644 --- a/composer.json +++ b/composer.json @@ -2,9 +2,9 @@ "name": "pd/coding-standard", "description": "Coding standard pro PeckaDesign", "require": { - "php": "7.* || 8.*", + "php": "7.4.* || 8.*", "squizlabs/php_codesniffer": "3.*", - "slevomat/coding-standard": "6.4.*", + "slevomat/coding-standard": "7.0.*", "escapestudios/symfony2-coding-standard": "3.*" }, "license": "MIT", diff --git a/src/PeckaCodingStandard/ruleset.xml b/src/PeckaCodingStandard/ruleset.xml index b730f5a..52ee8bf 100644 --- a/src/PeckaCodingStandard/ruleset.xml +++ b/src/PeckaCodingStandard/ruleset.xml @@ -10,7 +10,6 @@ - diff --git a/src/PeckaCodingStandardStrict/ruleset.xml b/src/PeckaCodingStandardStrict/ruleset.xml index 1879e3e..beaa0e7 100644 --- a/src/PeckaCodingStandardStrict/ruleset.xml +++ b/src/PeckaCodingStandardStrict/ruleset.xml @@ -11,7 +11,11 @@ - + + + + + diff --git a/tests/Failure/Classes/ClassMemberSpacing.php b/tests/Failure/Classes/ClassMemberSpacing.php index 387f83b..7691a57 100644 --- a/tests/Failure/Classes/ClassMemberSpacing.php +++ b/tests/Failure/Classes/ClassMemberSpacing.php @@ -4,7 +4,7 @@ final class ClassMemberSpacing { /** - * @var int + * @var int|string */ private $number; diff --git a/tests/Failure/Classes/UnusedPrivateElements.php b/tests/Failure/Classes/UnusedPrivateElements.php deleted file mode 100644 index 629639d..0000000 --- a/tests/Failure/Classes/UnusedPrivateElements.php +++ /dev/null @@ -1,19 +0,0 @@ -element; - } - - - public function execute(): void - { - $this->hello(); - } - -}