Skip to content

Commit

Permalink
ci(rector): add new rules for Rector configuration
Browse files Browse the repository at this point in the history
- Added BooleanInBooleanNotRuleFixerRector to the rules.
- Added StaticClosureRector to the rules.

These changes enhance the Rector configuration by incorporating additional rules that improve code quality and maintainability.
  • Loading branch information
guanguans committed Aug 16, 2024
1 parent 1e88f7e commit 592a0c4
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 2 additions & 0 deletions rector.php
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,9 @@
]);

$rectorConfig->rules([
BooleanInBooleanNotRuleFixerRector::class,
InlineConstructorDefaultToPropertyRector::class,
StaticClosureRector::class,
]);

$rectorConfig->ruleWithConfiguration(RenameFunctionRector::class, [
Expand Down
6 changes: 3 additions & 3 deletions src/Support/helpers.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,9 @@
/**
* @param mixed $expression
*
* @return string|void
*
* @noinspection DebugFunctionUsageInspection
*/
function var_output($expression, bool $return = false)
function var_output($expression, bool $return = false): ?string
{
$patterns = [
"/array \\(\n\\)/" => '[]',
Expand All @@ -36,6 +34,8 @@ function var_output($expression, bool $return = false)
}

echo $export;

return null;
}
}

Expand Down

0 comments on commit 592a0c4

Please sign in to comment.