Skip to content

Commit 7706a2f

Browse files
authored
bug #1469 add array_indentation to php-cs-fixer rules
1 parent 6f1e210 commit 7706a2f

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

src/Resources/config/php-cs-fixer.config.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
'@Symfony:risky' => true,
1616
'native_function_invocation' => false,
1717
'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']],
18+
'array_indentation' => true,
1819
])
1920
->setRiskyAllowed(true)
2021
;

src/Util/TemplateLinter.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ public function lintPhpTemplate(string|array $templateFilePath): void
5959
$templateFilePath = [$templateFilePath];
6060
}
6161

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

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

0 commit comments

Comments
 (0)