-
-
Notifications
You must be signed in to change notification settings - Fork 946
Closed
Description
Bug report
phpstan: 0.12.33, bleeding edge
If a private trait method is not used in some class phpstan raises a warning that the method is not used even if it's used in other class
Code snippet that reproduces the problem
https://phpstan.org/r/72f07c19-65b2-4ab6-a12b-d42cd37cd60f
<?php declare(strict_types = 1);
trait Foo {
private function bar(): void {} // Method Namaste::bar() is unused.
private function baz(): void {} // Method HelloWorld::bar() is unused.
}
class HelloWorld
{
use Foo;
public function hello(): void {
$this->bar();
}
}
class Namaste
{
use Foo;
public function hello(): void {
$this->baz();
}
}Expected output
no error
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels