Skip to content

Commit

Permalink
Merge pull request #2448 from lucasmichot/feat/style-docblock-align-c…
Browse files Browse the repository at this point in the history
…onsistancy

Enforce docblock alignment consistancy with phpdoc_align rule
  • Loading branch information
kylekatarnls authored Sep 11, 2021
2 parents d04ff92 + bd2432b commit 6903cba
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 11 deletions.
11 changes: 10 additions & 1 deletion .php-cs-fixer.dist.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,16 @@
'php_unit_test_case_static_method_calls' => [
'call_type' => 'this',
],
'phpdoc_align' => false,
'phpdoc_align' => [
'align' => 'vertical',
'tags' => [
'param',
'return',
'throws',
'type',
'var',
],
],
'phpdoc_indent' => true,
'phpdoc_inline_tag_normalizer' => true,
'phpdoc_no_access' => true,
Expand Down
4 changes: 2 additions & 2 deletions src/Carbon/CarbonInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -5013,8 +5013,8 @@ public function weeksInYear($dayOfWeek = null, $dayOfYear = null);
*
* /!\ Use this method for unit tests only.
*
* @param Closure|static|string|false|null $testNow real or mock Carbon instance
* @param Closure|null $callback
* @param Closure|static|string|false|null $testNow real or mock Carbon instance
* @param Closure|null $callback
*
* @return mixed
*/
Expand Down
8 changes: 4 additions & 4 deletions src/Carbon/CarbonInterval.php
Original file line number Diff line number Diff line change
Expand Up @@ -1905,8 +1905,8 @@ public function subtract($unit, $value = 1)
/**
* Add given parameters to the current interval.
*
* @param int $years
* @param int $months
* @param int $years
* @param int $months
* @param int|float $weeks
* @param int|float $days
* @param int|float $hours
Expand Down Expand Up @@ -1935,8 +1935,8 @@ public function plus(
/**
* Add given parameters to the current interval.
*
* @param int $years
* @param int $months
* @param int $years
* @param int $months
* @param int|float $weeks
* @param int|float $days
* @param int|float $hours
Expand Down
4 changes: 2 additions & 2 deletions src/Carbon/Traits/Test.php
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,8 @@ public static function setTestNow($testNow = null)
*
* /!\ Use this method for unit tests only.
*
* @param Closure|static|string|false|null $testNow real or mock Carbon instance
* @param Closure|null $callback
* @param Closure|static|string|false|null $testNow real or mock Carbon instance
* @param Closure|null $callback
*
* @return mixed
*/
Expand Down
4 changes: 2 additions & 2 deletions tests/Carbon/Exceptions/NotLocaleAwareExceptionTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ public function dataProviderTestNotAPeriodException(): Generator
/**
* @dataProvider dataProviderTestNotAPeriodException
*
* @param mixed $object
* @param string $message
* @param mixed $object
* @param string $message
*
* @return void
*/
Expand Down

0 comments on commit 6903cba

Please sign in to comment.