Tomáš Procházka created NETBEANS-3414:
-----------------------------------------

             Summary: Method not marked as unused
                 Key: NETBEANS-3414
                 URL: https://issues.apache.org/jira/browse/NETBEANS-3414
             Project: NetBeans
          Issue Type: Bug
          Components: php - Code Analysis, php - Editor
    Affects Versions: 11.2
            Reporter: Tomáš Procházka


Private method in class is not marked as unused when method with same name is 
used in class.

Example:
{code:java}
class Car {

    public function isEmpty(): bool {
    }
}

class Garage {

    /** @var Car */
    private $car;

    public function isCarEmpty(): bool {
        return $this->car->isEmpty(); // Comment this line and self::isEmpty() 
is marked as unused.
    }

    private function isEmpty(): bool {   
    }
}

{code}
Method Garage::isEmpty() is not used, but is not marked as unused.
 After commenting/deleting content of method Garage::isCarEmpty() is method 
Garage::isEmpty() marked as unused.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@netbeans.apache.org
For additional commands, e-mail: commits-h...@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists

Reply via email to