src/PhpParser/Node/Manipulator/VisibilityManipulator.php
private function removeOriginalVisibilityFromFlags(Node $node): void
    {
        $this->ensureIsClassMethodOrProperty($node, __METHOD__);

        // no modifier
        if ($node->flags === 0) {
            return;
        }

        if ($node->isPublic()) {
            $node->flags -= Class_::MODIFIER_PUBLIC;
        }

        if ($node->isProtected()) {
            $node->flags -= Class_::MODIFIER_PROTECTED;
        }

        if ($node->isPrivate()) {
            $node->flags -= Class_::MODIFIER_PRIVATE;
        }
    }
private function removeOriginalVisibilityFromFlags(Node $node): void
    {
        $this->ensureIsClassMethodOrProperty($node, __METHOD__);

        // no modifier
        if ($node->flags === 0) {
            return;
        }

        if ($node->isPublic()) {
            $node->flags -= Class_::MODIFIER_PUBLIC;
        }

        if ($node->isProtected()) {
            $node->flags -= Class_::MODIFIER_PROTECTED;
        }

        if ($node->isPrivate()) {
            $node->flags -= Class_::MODIFIER_PRIVATE;
        }
    }
private function removeOriginalVisibilityFromFlags ( Node $ node ) : void { $ this -> ensureIsClassMethodOrProperty ( $ node , __METHOD__ ) ; // no modifier if ( $ node -> flags === 0 ) { return ; } if ( $ node -> isPublic ( ) ) { $ node -> flags -= Class_ :: MODIFIER_PUBLIC ; } if ( $ node -> isProtected ( ) ) { $ node -> flags -= Class_ :: MODIFIER_PROTECTED ; } if ( $ node -> isPrivate ( ) ) { $ node -> flags -= Class_ :: MODIFIER_PRIVATE ; } }
This way "abstract", "static", "final" are kept

@param ClassMethod|Property|ClassConst $node
This way abstract static final are kept