jason-pomerleau / vscode-wordpress-toolbox

The ultimate WordPress snippet collection for Visual Studio Code.
MIT License
41 stars 8 forks source link

Fix WPCS warnings #17

Closed odil-io closed 2 years ago

odil-io commented 2 years ago

I placed spaces where needed using a search & replace method.

For example:

get_template_part($slug:string,$name:string|null,$args:array )

Should be:

get_template_part( $slug:string, $name:string|null, $args:array )

To prevent the following warnings to pop-up when using WordPress Code Standards:

No space found after comma in argument list (Generic.Functions.FunctionCallArgumentSpacing.NoSpaceAfterComma)

Expected 1 spaces after opening parenthesis; 0 found (PEAR.Functions.FunctionCallSignature.SpaceAfterOpenBracket)

Space after opening parenthesis of function call prohibited (PEAR.Functions.FunctionCallSignature.SpaceAfterOpenBracket)

Expected 0 spaces before closing parenthesis; 1 found (PEAR.Functions.FunctionCallSignature.SpaceBeforeCloseBracket)

jason-pomerleau commented 2 years ago

Hi @odil-io - thanks for this. I can't accept this PR because the snippets are automatically generated by another script, so your changes would be quickly overwritten on the next WordPress release. I have updated the script, and released a patch. Thanks again for pointing this out!

odil-io commented 2 years ago

Aah thought so! Thanks for reporting back :)