I need an extension in Visual Studio Code, to make my PHP code clean. I am a total beginner. What do you suggest?
1 Answer
You can install Extension php cs fixer by User "junstyle".
It will turn this:
<?php
$a = array("a" =>
"#test",
"b" => "foo")
into this (on save, if you so wish):
$a = ['a' => '#test',
'b' => 'foo']
How php-cs-fixer transforms things can be a bit tricky to configure. I have created a config file .vscode/php-cs-fixer.config.php
in my VSCode workspace. But I don't remember many details.