Skip to content

Commit

Permalink
add array_indentation to php-cs-fixer rules
Browse files Browse the repository at this point in the history
  • Loading branch information
IndraGunawan committed Mar 2, 2024
1 parent 2584cf7 commit f58b535
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/Resources/config/php-cs-fixer.config.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
'@Symfony:risky' => true,
'native_function_invocation' => false,
'blank_line_before_statement' => ['statements' => ['break', 'case', 'continue', 'declare', 'default', 'do', 'exit', 'for', 'foreach', 'goto', 'if', 'include', 'include_once', 'phpdoc', 'require', 'require_once', 'return', 'switch', 'throw', 'try', 'while', 'yield', 'yield_from']],
'array_indentation' => true,
])
->setRiskyAllowed(true)
;
2 changes: 1 addition & 1 deletion src/Util/TemplateLinter.php
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ public function lintPhpTemplate(string|array $templateFilePath): void
$templateFilePath = [$templateFilePath];
}

$ignoreEnv = str_contains(strtolower(\PHP_OS), 'win') ? 'set PHP_CS_FIXER_IGNORE_ENV=1&' : 'PHP_CS_FIXER_IGNORE_ENV=1 ';
$ignoreEnv = str_starts_with(strtolower(\PHP_OS), 'win') ? 'set PHP_CS_FIXER_IGNORE_ENV=1& ' : 'PHP_CS_FIXER_IGNORE_ENV=1 ';

$cmdPrefix = $this->needsPhpCmdPrefix ? 'php ' : '';

Expand Down

0 comments on commit f58b535

Please sign in to comment.