fix: remove dead statement referencing undefined variables in MediaRepository#485
Merged
turegjorup merged 2 commits intoJun 9, 2026
Merged
Conversation
…pository MediaRepository::getPaginator() computed $firstResult from the undefined variables $page and $itemsPerPage and never used the result. Remove the statement and drop the two corresponding variable.undefined entries from the PHPStan baseline. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
tuj
approved these changes
Jun 9, 2026
…media-repository-undefined-vars # Conflicts: # CHANGELOG.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Removes a dead statement in
MediaRepository::getPaginator()found while reviewing the PHPStan baseline (variable.undefined× 2):$pageand$itemsPerPageare undefined in that scope and$firstResultis never used — the statement only emits PHP warnings if executed.Note:
MediaRepository::getPaginator()itself appears to have no callers insrc/ortests/; this PR sticks to the minimal fix, but the whole method may be a candidate for removal in a follow-up.Files Changed
src/Repository/MediaRepository.php— dead statement removedphpstan-baseline.neon— regenerated viatask phpstan:generate-baseline; drops the two stalevariable.undefinedentriesCHANGELOG.md— entry under [Unreleased]Test Plan
task test:api -- --filter MediaTest— OK (5 tests, 16 assertions)task code-analysis— no errors🤖 Generated with Claude Code