Skip to content

Commit

Permalink
formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
realodix committed Jul 30, 2024
1 parent f83dff0 commit 7df7e16
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/Config.php
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ public static function create($ruleSet = null)

// If the rule set is a string, we try to find it in the RuleSet namespace
if (is_string($ruleSet)) {
/** @todo remove me */
// TODO: remove me
if (ucfirst($ruleSet) == 'Realodix') {
$ruleSet = 'Relax';
}
Expand Down
2 changes: 1 addition & 1 deletion src/RuleSet/Sets/Relax.php
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ public function mainRules(): array
],
],
'space_after_semicolon' => ['remove_in_empty_for_expressions' => true],
/** @todo: Add 'match' & 'parameters' when PHP 8.0+ is required */
// TODO:: Add 'match' & 'parameters' when PHP 8.0+ is required
'trailing_comma_in_multiline' => ['elements' => ['arrays', 'arguments']],
'unary_operator_spaces' => ['only_dec_inc' => true],
'whitespace_after_comma_in_array' => ['ensure_single_space' => true],
Expand Down
8 changes: 6 additions & 2 deletions src/RuleSet/Sets/RelaxPlus.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,19 @@ public function rules(): array
public function mainRules(): array
{
return [
// Migration
'assign_null_coalescing_to_coalesce_equal' => true,
'explicit_string_variable' => true,
'multiline_comment_opening_closing' => true,
'no_superfluous_elseif' => true,
'numeric_literal_separator' => ['override_existing' => true],
'php_unit_fqcn_annotation' => true,
'string_implicit_backslashes' => true,
'ternary_to_null_coalescing' => true,

// Control Structure
'no_superfluous_elseif' => true,

// Cleanup
'general_phpdoc_annotation_remove' => [
'annotations' => [
// https://github.com/doctrine/coding-standard/blob/3e88327/lib/Doctrine/ruleset.xml#L227
Expand All @@ -43,7 +48,6 @@ public function mainRules(): array
'expectedExceptionMessageRegExp',
],
],

Fixer\NoDoctrineMigrationsGeneratedCommentFixer::name() => true,
Fixer\NoPhpStormGeneratedCommentFixer::name() => true,
Fixer\NoUselessDoctrineRepositoryCommentFixer::name() => true,
Expand Down
2 changes: 1 addition & 1 deletion tests/Fixtures/Ruleset/relax_actual.php
Original file line number Diff line number Diff line change
Expand Up @@ -497,7 +497,7 @@ public function phpdoc__phpdoc_to_comment()
$foo = true;

// ignored_tags
/** @todo This should be a PHPDoc as the tag is on "ignored_tags" list */
// TODO: This should be a PHPDoc as the tag is on "ignored_tags" list
$bar = true;

// allow_before_return_statement
Expand Down
2 changes: 1 addition & 1 deletion tests/Fixtures/Ruleset/relax_expected.php
Original file line number Diff line number Diff line change
Expand Up @@ -490,7 +490,7 @@ public function phpdoc__phpdoc_to_comment()
$foo = true;

// ignored_tags
/** @todo This should be a PHPDoc as the tag is on "ignored_tags" list */
// TODO: This should be a PHPDoc as the tag is on "ignored_tags" list
$bar = true;

// allow_before_return_statement
Expand Down

0 comments on commit 7df7e16

Please sign in to comment.