public function areReturnTypesBoolCompatible($type = null) { if (count($this->returnTypes)) { foreach ($this->returnTypes as $returnType => $definition) { switch ($returnType) { case 'bool': return true; } } } return false; }