diff --git a/phpstan-baseline.neon b/phpstan-baseline.neon index c3d91f51..2a20eeda 100644 --- a/phpstan-baseline.neon +++ b/phpstan-baseline.neon @@ -2690,11 +2690,6 @@ parameters: count: 1 path: src/lib/Core/Debug/Shell/Shell.php - - - message: "#^Parameter \\#2 \\$callback of function array_filter expects callable\\(int\\|string\\)\\: mixed, Closure\\(string\\)\\: bool given\\.$#" - count: 1 - path: src/lib/Core/Debug/Shell/Shell.php - - message: "#^Method Ibexa\\\\Behat\\\\Core\\\\Log\\\\Failure\\\\AnalysisResult\\:\\:getJiraReference\\(\\) should return string but returns string\\|null\\.$#" count: 1 diff --git a/src/lib/API/Context/LimitationParser/ContentTypeLimitationParser.php b/src/lib/API/Context/LimitationParser/ContentTypeLimitationParser.php index a23e2d0b..7d7ba43e 100644 --- a/src/lib/API/Context/LimitationParser/ContentTypeLimitationParser.php +++ b/src/lib/API/Context/LimitationParser/ContentTypeLimitationParser.php @@ -57,7 +57,7 @@ private function parseCommonContentTypes(string $contentTypeName): string { $contentTypeName = strtolower($contentTypeName); - if (\in_array($contentTypeName, $this->contentTypeNameIdentifierMap, true)) { + if (\array_key_exists($contentTypeName, $this->contentTypeNameIdentifierMap)) { return $this->contentTypeNameIdentifierMap[$contentTypeName]; } diff --git a/src/lib/Core/Debug/Shell/Shell.php b/src/lib/Core/Debug/Shell/Shell.php index d0dd08f2..53130ee1 100644 --- a/src/lib/Core/Debug/Shell/Shell.php +++ b/src/lib/Core/Debug/Shell/Shell.php @@ -40,9 +40,12 @@ public function addBaseImports(): void ++$level; } $dir = dirname(__DIR__, $level); - $classess = array_keys(require $dir . '/vendor/composer/autoload_classmap.php'); + $classes = array_map( + 'strval', + array_keys(require $dir . '/vendor/composer/autoload_classmap.php') + ); - $baseImports = array_filter($classess, static function (string $classFcqn) { + $baseImports = array_filter($classes, static function (string $classFcqn): bool { return strpos($classFcqn, 'Ibexa\Behat\Browser\Element') === 0 || strpos($classFcqn, 'Ibexa\Behat\Browser\Locator') === 0; });