diff --git a/src/Resources/config/php-cs-fixer.config.php b/src/Resources/config/php-cs-fixer.config.php index 14c41bf27..9b5ee2826 100644 --- a/src/Resources/config/php-cs-fixer.config.php +++ b/src/Resources/config/php-cs-fixer.config.php @@ -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) ; diff --git a/src/Util/TemplateLinter.php b/src/Util/TemplateLinter.php index 657b39de5..341ff956a 100644 --- a/src/Util/TemplateLinter.php +++ b/src/Util/TemplateLinter.php @@ -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 ' : '';