/** * Adds a method to interface. * * @param InterfaceMethodNode|string $method * The method to append. Can either be an existing method, or a string (a * new public method will be created with that name). * * @return $this */ public function appendMethod($method) { if (is_string($method)) { $method = InterfaceMethodNode::create($method); } $this->statements->lastChild()->before($method); FormatterFactory::format($this); return $this; }