public function generate() { $nullable = $this->nullable ? '?' : ''; if ($this->isInternalPhpType) { return $nullable . strtolower($this->type); } return $nullable . '\\' . $this->type; }
/** * @param string|null $type * * @return string */ private function generateTypeHint() { if (null === $this->type) { return ''; } return $this->type->generate() . ' '; }