There are a lot of places in code which seems like:
public function getSomeFilteredThings(Someobj $obj = null, Someobj2 $obj2 = null)
It's restrict type by php typehint and we can don't care about type of variable but task of checking is null or object passed still available.
Most common methods to check are: if ($obj)
, if (null === $obj)
and if ($obj instanceof Someobj)
.