Skip to content

Commit

Permalink
Update PHP CS Fixer and custom fixers (#24)
Browse files Browse the repository at this point in the history
  • Loading branch information
kubawerlos authored Jan 21, 2022
1 parent aa57bd3 commit c852cb1
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 5 deletions.
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
],
"require": {
"php": "^8.0",
"friendsofphp/php-cs-fixer": "^3.2.1",
"kubawerlos/php-cs-fixer-custom-fixers": "^3.6.0"
"friendsofphp/php-cs-fixer": "^3.5.0",
"kubawerlos/php-cs-fixer-custom-fixers": "^3.7.0"
},
"require-dev": {
"phpunit/phpunit": "^9.5.10"
Expand Down
2 changes: 1 addition & 1 deletion src/Builder/Rules.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
final class Rules
{
/** @var array<string, mixed> */
private $rules = [];
private array $rules = [];

public function __construct()
{
Expand Down
5 changes: 3 additions & 2 deletions src/Rules/LibraryRules.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,7 @@
*/
final class LibraryRules implements RulesInterface
{
/** @var string */
private $header;
private string $header;

public function __construct(string $name, string $author, int $year)
{
Expand Down Expand Up @@ -114,6 +113,7 @@ public function getRules(): array
'function_typehint_space' => true,
'general_phpdoc_annotation_remove' => false,
'general_phpdoc_tag_rename' => true,
'get_class_to_class_keyword' => true,
'global_namespace_import' => false,
'group_import' => false,
'header_comment' => [
Expand Down Expand Up @@ -370,6 +370,7 @@ public function getRules(): array
Fixer\NoSuperfluousConcatenationFixer::name() => [
'allow_preventing_trailing_spaces' => true,
],
Fixer\NoTrailingCommaInSinglelineFixer::name() => true,
Fixer\NoUselessCommentFixer::name() => true,
Fixer\NoUselessDirnameCallFixer::name() => true,
Fixer\NoUselessDoctrineRepositoryCommentFixer::name() => true,
Expand Down
2 changes: 2 additions & 0 deletions src/Rules/ProjectRules.php
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ public function getRules(): array
'function_typehint_space' => true,
'general_phpdoc_annotation_remove' => false,
'general_phpdoc_tag_rename' => true,
'get_class_to_class_keyword' => true,
'global_namespace_import' => false,
'group_import' => false,
'header_comment' => false,
Expand Down Expand Up @@ -347,6 +348,7 @@ public function getRules(): array
Fixer\NoSuperfluousConcatenationFixer::name() => [
'allow_preventing_trailing_spaces' => true,
],
Fixer\NoTrailingCommaInSinglelineFixer::name() => true,
Fixer\NoUselessCommentFixer::name() => true,
Fixer\NoUselessDirnameCallFixer::name() => true,
Fixer\NoUselessDoctrineRepositoryCommentFixer::name() => true,
Expand Down

0 comments on commit c852cb1

Please sign in to comment.