object-sync-for-salesforce icon indicating copy to clipboard operation
object-sync-for-salesforce copied to clipboard

Remove Yoda conditions

Open jonathanstegall opened this issue 3 years ago • 1 comments

Is your feature request related to a problem? Please describe. No, but WPCS 3.0 will be removing the requirement for Yoda conditions. See this post. https://make.wordpress.org/core/2022/06/14/upcoming-disallow-assignments-in-conditions-and-remove-the-yoda-condition-requirement-for-php/

Describe the solution you'd like It's possible to install the Slevomat coding standards mentioned in the post, and run phpcbf to automatically perform this fix. It does look like Slevomat will be included with WPCS 3.

jonathanstegall avatar Jun 14 '22 15:06 jonathanstegall

Consider doing what WooCommerce is doing. See https://github.com/woocommerce/woocommerce/pull/34185

jonathanstegall avatar Aug 25 '22 21:08 jonathanstegall