PhpParser\Builder\Method::makeAbstract PHP Method

makeAbstract() public method

Makes the method abstract.
public makeAbstract ( )
    public function makeAbstract() {
        if (!empty($this->stmts)) {
            throw new \LogicException('Cannot make method with statements abstract');
        }

        $this->setModifier(Stmt\Class_::MODIFIER_ABSTRACT);
        $this->stmts = null; // abstract methods don't have statements

        return $this;
    }