wp-cli / scaffold-command

Generates code for post types, taxonomies, blocks, plugins, child themes, etc.
MIT License
165 stars 87 forks source link

QA: don't unnecessarily create variables within a function call #205

Closed jrfnl closed 5 years ago

jrfnl commented 5 years ago

When calling a function, it is nonsensical to assign the value of the parameter being passed to a variable within the function call, especially if that variable isn't used anywhere else.

This is just not a thing in PHP.

Looking at the code, it looks like this was done to document what the parameters meant. With that in mind, I've kept the variable assignments, but moved them out of the function call.

Alternatively, the meaning of the passed parameters could just be documented via inline trailing // [TYPE] message. comments.