awesomemotive / wpforms-phpcs

PHP Coding Standards used by the WPForms team.
https://wpforms.com
GNU General Public License v2.0
12 stars 1 forks source link

Check typecasting of the value returned from a filter #38

Open kagg-design opened 10 months ago

kagg-design commented 10 months ago

Expected Behavior

It is good to typecast at least the value returned from a filer. Example:

$array = (array) apply_filters( 'wpforms_some_filter', $array );

Having phpcs check such a typecasting would help make code robust and stable.

Current Behavior

We do not have such a check.