private function addProvidedTypehint() { if (!isset($this->provided_hints[$this->argno])) { return; } $provided_hint = $this->provided_hints[$this->argno]; if ($type = TypeFixer::fixType($provided_hint)) { $this->tokens[] = new Token($type . ' '); } }
/** * @return string */ private function buildReturnType() { if (!$this->return_type) { return new Token(''); } if (in_array(strtolower($this->name), self::$no_return_type_methods)) { return new Token(''); } if ($type = TypeFixer::fixType($this->return_type)) { return new Token(': ' . $type); } return new Token(''); }