Skip to content

Commit 7ade607

Browse files
#134 - phpdocs items spacing (#141)
1 parent e4b6e62 commit 7ade607

File tree

6 files changed

+25
-8
lines changed

6 files changed

+25
-8
lines changed

.gitattributes

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,6 @@
33

44
codestyle.php export-ignore
55
docker-compose.yml export-ignore
6-
Makefile export-ignore
76
logo.png export-ignore
7+
Makefile export-ignore
8+
renovate5.json export-ignore

composer.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,13 @@
55
"type": "library",
66
"require": {
77
"php": "^8.2",
8-
"friendsofphp/php-cs-fixer": "^3.59",
9-
"kubawerlos/php-cs-fixer-custom-fixers": "^3.21"
8+
"friendsofphp/php-cs-fixer": "^3.70",
9+
"kubawerlos/php-cs-fixer-custom-fixers": "^3.23"
1010
},
1111
"require-dev": {
1212
"jetbrains/phpstorm-attributes": "^1.1",
13-
"phpunit/phpunit": "^10.0|^11.2",
14-
"symfony/console": "^6.0|^7.0"
13+
"phpunit/phpunit": "^11.2",
14+
"symfony/console": "^7.0"
1515
},
1616
"authors": [
1717
{

docker-compose.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
1-
version: "3.7"
2-
31
services:
42
php:
5-
image: ghcr.io/blumilksoftware/php:8.2
3+
image: ghcr.io/blumilksoftware/php:8.3
64
container_name: blumilk-codestyle-php
75
working_dir: /application
86
user: ${CURRENT_UID:-1000}

src/Configuration/Defaults/CommonRules.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,7 @@
7979
use PhpCsFixer\Fixer\Phpdoc\NoBlankLinesAfterPhpdocFixer;
8080
use PhpCsFixer\Fixer\Phpdoc\NoEmptyPhpdocFixer;
8181
use PhpCsFixer\Fixer\Phpdoc\NoSuperfluousPhpdocTagsFixer;
82+
use PhpCsFixer\Fixer\Phpdoc\PhpdocAlignFixer;
8283
use PhpCsFixer\Fixer\Phpdoc\PhpdocIndentFixer;
8384
use PhpCsFixer\Fixer\Phpdoc\PhpdocLineSpanFixer;
8485
use PhpCsFixer\Fixer\Phpdoc\PhpdocNoEmptyReturnFixer;
@@ -372,5 +373,6 @@ class CommonRules extends Rules
372373
ConstantCaseFixer::class => true,
373374
PhpUnitAttributesFixer::class => true,
374375
SpacesInsideParenthesesFixer::class => true,
376+
PhpdocAlignFixer::class => ["align" => "left"],
375377
];
376378
}

tests/fixtures/phpdocs/actual.php

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,4 +29,12 @@ public function add(int $i): void
2929
{
3030
$this->i = $this->i + $i;
3131
}
32+
33+
/**
34+
* @param int $i
35+
*/
36+
public function remove($i): void
37+
{
38+
$this->i = $this->i - $i;
39+
}
3240
}

tests/fixtures/phpdocs/expected.php

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,12 @@ public function add(int $i): void
1414
{
1515
$this->i = $this->i + $i;
1616
}
17+
18+
/**
19+
* @param int $i
20+
*/
21+
public function remove($i): void
22+
{
23+
$this->i = $this->i - $i;
24+
}
1725
}

0 commit comments

Comments
 (0)