Fixes #2884
* adding specific checks for typecasting booleans, re: vimeo/psalm#2548 * satisfying phpcs * amend check to use psalm types rather than php-parser types * implementing tests for typecasting bools to int * satisfying phpcs