I've managed to get PHP CodeSniffer installed and working. I have also managed to write my own custom sniffs.
There is one issue that I cannot figure out - how do I override the $allowedTypes
variable which is defined in the main PHP_CodeSniffer
class:
public static $allowedTypes = array(
'array',
'boolean',
'float',
'integer',
'mixed',
'object',
'string',
'resource',
'callable',
);
I would like to add 'bool' and 'int' options to this array, but without monkey patching the core repository.