harden method signatures

Part 2 of https://github.com/cakephp/cakephp/pull/3233