diff --git a/Annotation/Inject.php b/Annotation/Inject.php index 656aa8df..42c5581b 100644 --- a/Annotation/Inject.php +++ b/Annotation/Inject.php @@ -39,7 +39,7 @@ use Snowflake\Snowflake; } /** @var ReflectionProperty $class */ - if ($class->isPrivate() || $class->isProtected()) { + if ($method->isPrivate() || $method->isProtected()) { $method = 'set' . ucfirst($class->getName()); if (!method_exists($class, $method)) { return false;