getConfig('nullable')) { $type = null; return; } $throwableType = $type instanceof NullableType ? $type->type : $type; // Make this less ugly when we implement a namespace context if (\in_array($throwableType->toString(), $this->getConfig('types'))) { $type = null; } } /** * Remove param. * * @param Param $node Parameter * @return void */ public function enterParam(Param $node): void { $this->strip($node->type); } /** * Strip return throwable type. * * @param FunctionLike $func Function * * @return void */ public function enterFuncReturn(FunctionLike $func): void { $this->strip($func->getReturnType()); } }