fix(since): Ignore private methods in OCP

Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
This commit is contained in:
Daniel Kesselberg 2026-04-27 17:40:30 +02:00
parent fd8d7878d4
commit aee960cc5a
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');
}