diff --git a/.gitattributes b/.gitattributes index 805cd72..d38f569 100644 --- a/.gitattributes +++ b/.gitattributes @@ -3,5 +3,6 @@ codestyle.php export-ignore docker-compose.yml export-ignore -Makefile export-ignore logo.png export-ignore +Makefile export-ignore +renovate5.json export-ignore diff --git a/composer.json b/composer.json index 1783a27..5d755fa 100644 --- a/composer.json +++ b/composer.json @@ -5,13 +5,13 @@ "type": "library", "require": { "php": "^8.2", - "friendsofphp/php-cs-fixer": "^3.59", - "kubawerlos/php-cs-fixer-custom-fixers": "^3.21" + "friendsofphp/php-cs-fixer": "^3.70", + "kubawerlos/php-cs-fixer-custom-fixers": "^3.23" }, "require-dev": { "jetbrains/phpstorm-attributes": "^1.1", - "phpunit/phpunit": "^10.0|^11.2", - "symfony/console": "^6.0|^7.0" + "phpunit/phpunit": "^11.2", + "symfony/console": "^7.0" }, "authors": [ { diff --git a/docker-compose.yml b/docker-compose.yml index 61f681d..39c460e 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,8 +1,6 @@ -version: "3.7" - services: php: - image: ghcr.io/blumilksoftware/php:8.2 + image: ghcr.io/blumilksoftware/php:8.3 container_name: blumilk-codestyle-php working_dir: /application user: ${CURRENT_UID:-1000} diff --git a/src/Configuration/Defaults/CommonRules.php b/src/Configuration/Defaults/CommonRules.php index 45381dd..990e651 100644 --- a/src/Configuration/Defaults/CommonRules.php +++ b/src/Configuration/Defaults/CommonRules.php @@ -79,6 +79,7 @@ use PhpCsFixer\Fixer\Phpdoc\NoBlankLinesAfterPhpdocFixer; use PhpCsFixer\Fixer\Phpdoc\NoEmptyPhpdocFixer; use PhpCsFixer\Fixer\Phpdoc\NoSuperfluousPhpdocTagsFixer; +use PhpCsFixer\Fixer\Phpdoc\PhpdocAlignFixer; use PhpCsFixer\Fixer\Phpdoc\PhpdocIndentFixer; use PhpCsFixer\Fixer\Phpdoc\PhpdocLineSpanFixer; use PhpCsFixer\Fixer\Phpdoc\PhpdocNoEmptyReturnFixer; @@ -372,5 +373,6 @@ class CommonRules extends Rules ConstantCaseFixer::class => true, PhpUnitAttributesFixer::class => true, SpacesInsideParenthesesFixer::class => true, + PhpdocAlignFixer::class => ["align" => "left"], ]; } diff --git a/tests/fixtures/phpdocs/actual.php b/tests/fixtures/phpdocs/actual.php index 777f1b9..fcbf448 100644 --- a/tests/fixtures/phpdocs/actual.php +++ b/tests/fixtures/phpdocs/actual.php @@ -29,4 +29,12 @@ public function add(int $i): void { $this->i = $this->i + $i; } + + /** + * @param int $i + */ + public function remove($i): void + { + $this->i = $this->i - $i; + } } diff --git a/tests/fixtures/phpdocs/expected.php b/tests/fixtures/phpdocs/expected.php index c43aec9..6fe0162 100644 --- a/tests/fixtures/phpdocs/expected.php +++ b/tests/fixtures/phpdocs/expected.php @@ -14,4 +14,12 @@ public function add(int $i): void { $this->i = $this->i + $i; } + + /** + * @param int $i + */ + public function remove($i): void + { + $this->i = $this->i - $i; + } }