protected function removeDuplicateMethodsFromPhpDoc()
    {
        $methodNames = array_map(function (Method $method) {
            return $method->getName();
        }, $this->getMethods());

        foreach ($this->phpdoc->getTags() as $tag) {
            if ($tag instanceof MethodTag && in_array($tag->getMethodName(), $methodNames)) {
                $this->phpdoc->deleteTag($tag);
            }
        }
    }
protected function removeDuplicateMethodsFromPhpDoc()
    {
        $methodNames = array_map(function (Method $method) {
            return $method->getName();
        }, $this->getMethods());

        foreach ($this->phpdoc->getTags() as $tag) {
            if ($tag instanceof MethodTag && in_array($tag->getMethodName(), $methodNames)) {
                $this->phpdoc->deleteTag($tag);
            }
        }
    }
protected function removeDuplicateMethodsFromPhpDoc ( ) { $ methodNames = array_map ( function ( Method $ method ) { return $ method -> getName ( ) ; } , $ this -> getMethods ( ) ) ; foreach ( $ this -> phpdoc -> getTags ( ) as $ tag ) { if ( $ tag instanceof MethodTag && in_array ( $ tag -> getMethodName ( ) , $ methodNames ) ) { $ this -> phpdoc -> deleteTag ( $ tag ) ; } } }
Removes method tags from the doc comment that already appear as functions inside the class.
This prevents duplicate function errors in the IDE.

@return void
Removes method tags from the doc comment that already appear as functions inside the class . This prevents duplicate function errors in the IDE .