/** * @param boolean $is_reference * @return $this */ public function setReference($is_reference) { if ($is_reference) { if (!isset($this->reference)) { $this->reference = Token::reference(); $this->openParen->before($this->reference); } } else { if (isset($this->reference)) { $this->reference->remove(); } } return $this; }
/** * @param boolean $is_reference * @return $this */ public function setReference($is_reference) { if ($is_reference) { if (!isset($this->reference)) { /** @var \Pharborist\Functions\FunctionDeclarationNode|\Pharborist\Objects\ClassMethodNode|\Pharborist\Objects\InterfaceMethodNode $this */ $this->reference = Token::reference(); $this->name->before($this->reference); } } else { if (isset($this->reference)) { $this->reference->remove(); } } return $this; }