I can't figure out how to provide a custom list of forbidden functions. I'm not sure if it's even possible, given that the $forbiddenFunctions property is protected. But the doc block says: "Can be used to forbid the use of any function." so perhaps I'm just doing something wrong.
I am using the following command:
$ phpcs -l -p src\lib --extensions=php --standard=phpcs.xml
And phpcs.xml looks like this:
<?xml version="1.0"?>
<ruleset name="Custom Standard">
<description>Test Coding Standard</description>
<rule ref="Generic.PHP.ForbiddenFunctions">
<properties>
<property name="forbiddenFunctionNames" type="array" value="eval,system,phpinfo"/>
</properties>
</rule>
</ruleset>
The error message is:
PHP Fatal error: Cannot access protected property Generic_Sniffs_PHP_ForbiddenFunctionsSniff::$forbiddenFunctionNames