diff --git a/CHANGELOG.md b/CHANGELOG.md index 38496159d..a415a2a3b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,8 @@ All notable changes to this project will be documented in this file. ## [Unreleased] +- Removed a dead statement in `MediaRepository::getPaginator()` that referenced the undefined + variables `$page` and `$itemsPerPage`; the computed value was never used. - Fixed inverted user-type guard in `UserService::activateExternalUser()`: the "user is not of external type" check could never trigger due to a stray negation (`=== !$user->getUserType()`). The endpoint was still protected by `ExternalUserAuthenticator`, so this restores the intended diff --git a/phpstan-baseline.neon b/phpstan-baseline.neon index 5f2fea10b..86327f56f 100644 --- a/phpstan-baseline.neon +++ b/phpstan-baseline.neon @@ -2112,18 +2112,6 @@ parameters: count: 1 path: src/Repository/MediaRepository.php - - - message: '#^Undefined variable\: \$itemsPerPage$#' - identifier: variable.undefined - count: 1 - path: src/Repository/MediaRepository.php - - - - message: '#^Undefined variable\: \$page$#' - identifier: variable.undefined - count: 1 - path: src/Repository/MediaRepository.php - - message: '#^Class App\\Repository\\PlaylistRepository has PHPDoc tag @method for method findBy\(\) parameter \#1 \$criteria with no value type specified in iterable type array\.$#' identifier: missingType.iterableValue diff --git a/src/Repository/MediaRepository.php b/src/Repository/MediaRepository.php index 2b4daeea2..77d0ea5d0 100644 --- a/src/Repository/MediaRepository.php +++ b/src/Repository/MediaRepository.php @@ -40,8 +40,6 @@ public function getById(Ulid $mediaId): QueryBuilder public function getPaginator(Ulid $slideUlid): QueryBuilder { - $firstResult = ($page - 1) * $itemsPerPage; - $queryBuilder = $this->_em->createQueryBuilder(); $queryBuilder->select('s') ->from(Slide::class, 's')