1

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 1

0

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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.