Very common in PHP code bases is obsessive type check, noticeably code like declare(strict_types=1) and private function( int $id ). It's basically "Always check your types". I think a better rule is: Check a type when the variable is created, mutated, or received from an external source. Then trust it until something happens that could […]