How to automatically add whitespace to WordPress parenthesis in VS Code?

Viewed 16

In WordPress, the coding standards recommend using extra whitespace within if/else statements and any other parenthesis like so:

if( is_single() ) { //Added whitespace 
    echo 'foo';
}

However, I cannot figure out how to achieve this in VS Code. Mine always formats to:

if(is_single()) { // no whitespace 
    echo 'foo';
}

Any ideas on how to achieve this? I'm using Format HTML in PHP as my formatter.

0 Answers
Related