From 9ea91d33ba81d4c1832f5d907c0c5d1cb5fdb722 Mon Sep 17 00:00:00 2001 From: Benjamin Kott Date: Tue, 25 Jun 2024 14:27:12 +0200 Subject: [PATCH] [TASK] PHP Stan Corrections --- Build/phpstan.neon | 2 +- Classes/Backend/ToolbarItem/VersionToolbarItem.php | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Build/phpstan.neon b/Build/phpstan.neon index f304e13af..00e823e0c 100644 --- a/Build/phpstan.neon +++ b/Build/phpstan.neon @@ -7,10 +7,10 @@ includes: parameters: level: 8 - checkMissingIterableValueType: false reportUnmatchedIgnoredErrors: false ignoreErrors: + - identifier: missingType.iterableValue - "#Casting to string something that's already string.#" - "#^Call to an undefined method TYPO3Fluid\\\\Fluid\\\\Core\\\\Rendering\\\\RenderingContextInterface\\:\\:getRequest\\(\\)\\.$#" diff --git a/Classes/Backend/ToolbarItem/VersionToolbarItem.php b/Classes/Backend/ToolbarItem/VersionToolbarItem.php index 743c10ca3..f5379ff1d 100644 --- a/Classes/Backend/ToolbarItem/VersionToolbarItem.php +++ b/Classes/Backend/ToolbarItem/VersionToolbarItem.php @@ -41,12 +41,12 @@ public function addVersionInformation(SystemInformationToolbarItem $systemInform if ((int)$returnCode === 0) { $currentDir = (string) getcwd(); chdir($extensionDirectory); - $tag = trim(CommandUtility::exec('git tag -l --points-at HEAD')); + $tag = trim((string) CommandUtility::exec('git tag -l --points-at HEAD')); if ($tag !== '') { $value = $tag; } else { - $branch = trim(CommandUtility::exec('git rev-parse --abbrev-ref HEAD')); - $revision = trim(CommandUtility::exec('git rev-parse --short HEAD')); + $branch = trim((string) CommandUtility::exec('git rev-parse --abbrev-ref HEAD')); + $revision = trim((string) CommandUtility::exec('git rev-parse --short HEAD')); $value = $branch . ', ' . $revision; } chdir($currentDir);