您可以设置PHP-CS-Fixer config file path并设置setIndent()值,如PHP-CS-Fixer的documentation网站所定义。
See image for Atom package settings
用这样的东西设置.php_cs。请注意->setIndent(" ")有两个空格而不是\t字符。
/*
* This file is part of PHP CS Fixer.
* (c) Fabien Potencier
* Dariusz Rumiński
* This source file is subject to the MIT license that is bundled
* with this source code in the file LICENSE.
*/
$header = <<
This file is part of PHP CS Fixer.
(c) Fabien Potencier
Dariusz Rumiński
This source file is subject to the MIT license that is bundled
with this source code in the file LICENSE.
EOF;
return PhpCsFixer\Config::create()
/* ... other settings */
->setIndent(" ")
/* ... other settings */我在这里使用php-cs-fixer插件版本4.1.0。