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