fix(since): Import PhpParser classes

Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
This commit is contained in:
Daniel Kesselberg 2026-04-27 17:39:39 +02:00
parent 4b6837cfbf
commit beef35d64e
No known key found for this signature in database
GPG key ID: 4A81C29F63464E8F

View file

@ -1,12 +1,17 @@
<?php
declare(strict_types=1);
/**
* SPDX-FileCopyrightText: 2023 Nextcloud GmbH and Nextcloud contributors
* SPDX-License-Identifier: AGPL-3.0-only
*/
use PhpParser\Node\Stmt;
use PhpParser\Node\Stmt\ClassConst;
use PhpParser\Node\Stmt\ClassLike;
use PhpParser\Node\Stmt\ClassMethod;
use PhpParser\Node\Stmt\EnumCase;
use Psalm\CodeLocation;
use Psalm\DocComment;
use Psalm\Exception\DocblockParseException;
@ -34,7 +39,6 @@ class OcpSinceChecker implements Psalm\Plugin\EventHandler\AfterClassLikeVisitIn
} else {
self::checkClassComment($classLike, $statementsSource);
}
foreach ($classLike->stmts as $stmt) {
if ($stmt instanceof ClassConst) {
self::checkStatementComment($stmt, $statementsSource, 'constant');