We noticed that there is WPCS rule for spacing around the colon in function return types. We had some discrepancies in how we were spacing the colon and since most of our team is using the Neutron coding standards I decided we should implement that check too.
The idea is that there should be no space between the function declaration and the colon, but then there should be a space between the colon and the return type.
We noticed that there is WPCS rule for spacing around the colon in function return types. We had some discrepancies in how we were spacing the colon and since most of our team is using the Neutron coding standards I decided we should implement that check too.
The idea is that there should be no space between the function declaration and the colon, but then there should be a space between the colon and the return type.
So basically:
see the "return type" example here - https://make.wordpress.org/core/handbook/best-practices/coding-standards/php/#space-usage