Skip to content

[BUGFIX] Adjust null checks so they also check for non existent key arrays #1365

[BUGFIX] Adjust null checks so they also check for non existent key arrays

[BUGFIX] Adjust null checks so they also check for non existent key arrays #1365

Triggered via pull request November 26, 2024 13:17
Status Failure
Total duration 50s
Artifacts

phpstan.yml

on: pull_request
Static Code Analysis
39s
Static Code Analysis
Fit to window
Zoom out
Zoom in

Annotations

10 errors
Static Code Analysis: Classes/Common/KitodoFlashMessageRenderer.php#L82
Call to function is_int() with int will always evaluate to true.
Static Code Analysis: Classes/Common/MetsDocument.php#L1135
Method Kitodo\Dlf\Common\MetsDocument::getStructureDepth() never returns bool so it can be removed from the return type.
Static Code Analysis: Classes/Common/Solr/SearchResult/ResultDocument.php#L50
Property Kitodo\Dlf\Common\Solr\SearchResult\ResultDocument::$snippets (string|null) is never assigned null so it can be removed from the property type.
Static Code Analysis: Classes/Common/Solr/SearchResult/ResultDocument.php#L233
PHPDoc tag @return has invalid value (array(Page) All result's pages which contain search phrase): Unexpected token "(", expected TOKEN_HORIZONTAL_WS at offset 119 on line 6
Static Code Analysis: Classes/Common/Solr/SearchResult/ResultDocument.php#L245
PHPDoc tag @return has invalid value (array(Region) All result's regions which contain search phrase): Unexpected token "(", expected TOKEN_HORIZONTAL_WS at offset 121 on line 6
Static Code Analysis: Classes/Common/Solr/SearchResult/ResultDocument.php#L257
PHPDoc tag @return has invalid value (array(Highlight) All result's highlights of search phrase): Unexpected token "(", expected TOKEN_HORIZONTAL_WS at offset 113 on line 6
Static Code Analysis: Classes/Common/Solr/SearchResult/ResultDocument.php#L269
PHPDoc tag @return has invalid value (array(string) All result's highlights of search phrase): Unexpected token "(", expected TOKEN_HORIZONTAL_WS at offset 118 on line 6
Static Code Analysis: Classes/Common/Solr/Solr.php#L107
PHPDoc tag @var has invalid value (array(Solr) This holds the singleton search objects with their core as array key): Unexpected token "(", expected TOKEN_HORIZONTAL_WS at offset 46 on line 3
Static Code Analysis: Classes/Controller/ToolboxController.php#L161
PHPDoc tag @SuppressWarnings has invalid value ((PHPMD.UnusedPrivateMethod)): Unexpected token ".UnusedPrivateMethod)", expected ')' at offset 88 on line 3
Static Code Analysis: Classes/Controller/ToolboxController.php#L189
PHPDoc tag @SuppressWarnings has invalid value ((PHPMD.UnusedPrivateMethod)): Unexpected token ".UnusedPrivateMethod)", expected ')' at offset 95 on line 3