Forking from T216969: API inconsistently uses int casting methods, it would be nice if we could use codesniffer to use (int) et al rather than intval()
We might be able to reuse https://github.com/dereuromark/cakephp-codesniffer/blob/master/Vendor/PHP/CodeSniffer/Standards/MyCakePHP/Sniffs/PHP/CastSniff.php