Skip to content

[BUGFIX] Fix OaiPmhController#1996

Open
stweil wants to merge 2 commits into
kitodo:mainfrom
stweil:OaiPmhController
Open

[BUGFIX] Fix OaiPmhController#1996
stweil wants to merge 2 commits into
kitodo:mainfrom
stweil:OaiPmhController

Conversation

@stweil

@stweil stweil commented Jun 11, 2026

Copy link
Copy Markdown
Member

Assisted-by: Gemma4 (Google)

stweil added 2 commits June 11, 2026 10:33
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>
@stweil

stweil commented Jun 11, 2026

Copy link
Copy Markdown
Member Author

The CI failure looks unrelated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant