fix(since): Ignore private methods in OCP

fix(since): Ignore private methods in OCP

Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>

[skip ci]
This commit is contained in:
Daniel Kesselberg 2026-04-27 17:40:30 +02:00
parent beef35d64e
commit b323ea9994
No known key found for this signature in database
GPG key ID: 4A81C29F63464E8F

View file

@ -44,7 +44,7 @@ class OcpSinceChecker implements Psalm\Plugin\EventHandler\AfterClassLikeVisitIn
self::checkStatementComment($stmt, $statementsSource, 'constant');
}
if ($stmt instanceof ClassMethod) {
if ($stmt instanceof ClassMethod && ($stmt->isPublic() || $stmt->isProtected())) {
self::checkStatementComment($stmt, $statementsSource, 'method');
}