public function getReturnType() : Type { if ($this->returnType === null) { $phpDocReturnType = $this->phpDocReturnType; if ($this->realReturnTypePresent && $phpDocReturnType !== null && $this->realReturnType->isNullable() !== $phpDocReturnType->isNullable()) { $phpDocReturnType = null; } $this->returnType = TypehintHelper::decideType($this->realReturnType, $phpDocReturnType); } return $this->returnType; }