[BUGFIX] Fix OaiPmhController#1996
Open
stweil wants to merge 2 commits into
Open
Conversation
Don't exclude OaiPmhController.php. Signed-off-by: Stefan Weil <sw@weilnetz.de>
This fixes several PHPStan error messages (including real bugs):
------ --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Line Controller/OaiPmhController.php
------ --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
112 Property Kitodo\Dlf\Controller\OaiPmhController::$formats type has no value type specified in iterable type array.
💡 See: https://phpstan.org/blog/solving-phpstan-no-value-type-specified-in-iterable-type
134 Property Kitodo\Dlf\Controller\OaiPmhController::$parameters type has no value type specified in iterable type array.
💡 See: https://phpstan.org/blog/solving-phpstan-no-value-type-specified-in-iterable-type
188 Method Kitodo\Dlf\Controller\OaiPmhController::getDublinCoreData() has parameter $record with no value type specified in iterable type array.
💡 See: https://phpstan.org/blog/solving-phpstan-no-value-type-specified-in-iterable-type
188 Method Kitodo\Dlf\Controller\OaiPmhController::getDublinCoreData() return type has no value type specified in iterable type array.
💡 See: https://phpstan.org/blog/solving-phpstan-no-value-type-specified-in-iterable-type
231 Method Kitodo\Dlf\Controller\OaiPmhController::addDublinCoreData() has parameter $metadata with no value type specified in iterable type array.
💡 See: https://phpstan.org/blog/solving-phpstan-no-value-type-specified-in-iterable-type
248 Method Kitodo\Dlf\Controller\OaiPmhController::getMetsData() has parameter $record with no value type specified in iterable type array.
💡 See: https://phpstan.org/blog/solving-phpstan-no-value-type-specified-in-iterable-type
264 Method Kitodo\Dlf\Controller\OaiPmhController::getMetsData() should return string but returns string|false|null.
310 Parameter #1 $string of function trim expects string, string|false given.
323 Method Kitodo\Dlf\Controller\OaiPmhController::resume() return type has no value type specified in iterable type array.
💡 See: https://phpstan.org/blog/solving-phpstan-no-value-type-specified-in-iterable-type
360 Cannot access offset 'uid' on array<string, mixed>|false.
467 Call to an undefined method Exception::getErrorMessage().
551 Call to an undefined method Exception::getErrorMessage().
587 Method Kitodo\Dlf\Controller\OaiPmhController::fetchDocumentSet() return type has no value type specified in iterable type array.
💡 See: https://phpstan.org/blog/solving-phpstan-no-value-type-specified-in-iterable-type
764 Method Kitodo\Dlf\Controller\OaiPmhController::generateResultSet() return type has no value type specified in iterable type array.
💡 See: https://phpstan.org/blog/solving-phpstan-no-value-type-specified-in-iterable-type
786 Method Kitodo\Dlf\Controller\OaiPmhController::generateOutputForDocumentList() has parameter $documentListSet with no value type specified in iterable type array.
💡 See: https://phpstan.org/blog/solving-phpstan-no-value-type-specified-in-iterable-type
786 Method Kitodo\Dlf\Controller\OaiPmhController::generateOutputForDocumentList() return type has no value type specified in iterable type array.
💡 See: https://phpstan.org/blog/solving-phpstan-no-value-type-specified-in-iterable-type
837 Method Kitodo\Dlf\Controller\OaiPmhController::generateResumptionTokenForDocumentListSet() has parameter $documentListSet with no value type specified in iterable type array.
💡 See: https://phpstan.org/blog/solving-phpstan-no-value-type-specified-in-iterable-type
------ --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
[ERROR] Found 17 errors
Assisted-by: Gemma4 (Google)
Signed-off-by: Stefan Weil <sw@weilnetz.de>
Member
Author
|
The CI failure looks unrelated. |
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.
Assisted-by: Gemma4 (Google)