From ea128ed24009fe0952068aa3728f21fe9dea4e6a Mon Sep 17 00:00:00 2001 From: Jannik Zschiesche Date: Mon, 23 Sep 2024 16:30:03 +0200 Subject: [PATCH] Fix CI --- src/Controller/BaseController.php | 4 ++-- src/Doctrine/DoctrineChangeChecker.php | 4 ++-- src/Exception/MissingOptionalDependencyException.php | 2 +- src/Exception/Structure/InvalidArgumentTypeException.php | 2 +- src/Exception/Structure/MissingArgumentException.php | 2 +- src/Exception/UnexpectedTypeException.php | 2 +- src/Stats/SectionStatsLog.php | 2 +- 7 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/Controller/BaseController.php b/src/Controller/BaseController.php index 881a190..054d8eb 100644 --- a/src/Controller/BaseController.php +++ b/src/Controller/BaseController.php @@ -86,7 +86,7 @@ public function fetchJsonRequestBody (Request $request, bool $allowInvalid = fal if (!\is_array($data)) { throw new InvalidJsonRequestException( - sprintf("Invalid top level type in JSON payload. Must be array, is %s", \gettype($data)), + \sprintf("Invalid top level type in JSON payload. Must be array, is %s", \gettype($data)), 400, ); } @@ -96,7 +96,7 @@ public function fetchJsonRequestBody (Request $request, bool $allowInvalid = fal catch (\JsonException $exception) { throw new InvalidJsonRequestException( - sprintf("Parsing JSON payload failed: %s", $exception->getMessage()), + \sprintf("Parsing JSON payload failed: %s", $exception->getMessage()), 400, $exception, ); diff --git a/src/Doctrine/DoctrineChangeChecker.php b/src/Doctrine/DoctrineChangeChecker.php index 0d53388..ce0e275 100644 --- a/src/Doctrine/DoctrineChangeChecker.php +++ b/src/Doctrine/DoctrineChangeChecker.php @@ -26,7 +26,7 @@ public function hasContentChanged () : bool if (!$defaultEntityManager instanceof EntityManagerInterface) { - throw new InvalidDoctrineChangeCheckException(sprintf( + throw new InvalidDoctrineChangeCheckException(\sprintf( "Default manager is no entity manager, but '%s'", get_debug_type($defaultEntityManager), )); @@ -80,7 +80,7 @@ public function getEntityChanges ( if (!$entityManager instanceof EntityManagerInterface) { - throw new InvalidDoctrineChangeCheckException(sprintf( + throw new InvalidDoctrineChangeCheckException(\sprintf( "Could not fetch entity manager for entity of type '%s'", $entityClass, )); diff --git a/src/Exception/MissingOptionalDependencyException.php b/src/Exception/MissingOptionalDependencyException.php index 08b3919..b7b44dd 100644 --- a/src/Exception/MissingOptionalDependencyException.php +++ b/src/Exception/MissingOptionalDependencyException.php @@ -10,7 +10,7 @@ final class MissingOptionalDependencyException extends \Exception implements Rad public function __construct (string $package, ?\Throwable $previous = null) { parent::__construct( - sprintf("Missing optional dependency: %s", $package), + \sprintf("Missing optional dependency: %s", $package), 0, $previous, ); diff --git a/src/Exception/Structure/InvalidArgumentTypeException.php b/src/Exception/Structure/InvalidArgumentTypeException.php index b3dd7db..39dc724 100644 --- a/src/Exception/Structure/InvalidArgumentTypeException.php +++ b/src/Exception/Structure/InvalidArgumentTypeException.php @@ -16,7 +16,7 @@ public static function create ( ) : static { return new self( - sprintf( + \sprintf( "Invalid argument type for key '%s': expected %s, but was %s", $key, $expected, diff --git a/src/Exception/Structure/MissingArgumentException.php b/src/Exception/Structure/MissingArgumentException.php index 7fdad1c..3ba2d75 100644 --- a/src/Exception/Structure/MissingArgumentException.php +++ b/src/Exception/Structure/MissingArgumentException.php @@ -16,7 +16,7 @@ public static function create ( ) : static { return new self( - sprintf( + \sprintf( "Missing argument '%s'. Only keys registered are %s", $missingKey, implode(", ", $allKeys), diff --git a/src/Exception/UnexpectedTypeException.php b/src/Exception/UnexpectedTypeException.php index f2837b1..83d9300 100644 --- a/src/Exception/UnexpectedTypeException.php +++ b/src/Exception/UnexpectedTypeException.php @@ -12,7 +12,7 @@ public function __construct ( ?\Throwable $previous = null, ) { parent::__construct( - sprintf('Expected argument of type %s, "%s" given', $expectedType, get_debug_type($value)), + \sprintf('Expected argument of type %s, "%s" given', $expectedType, get_debug_type($value)), 0, $previous, ); diff --git a/src/Stats/SectionStatsLog.php b/src/Stats/SectionStatsLog.php index 525f9bc..8876f81 100644 --- a/src/Stats/SectionStatsLog.php +++ b/src/Stats/SectionStatsLog.php @@ -15,7 +15,7 @@ final class SectionStatsLog implements StatsLogInterface public function __construct (StatsLogInterface $parent, string $prefix) { $this->parent = $parent; - $this->prefix = sprintf("[%s] ", rtrim($prefix)); + $this->prefix = \sprintf("[%s] ", rtrim($prefix)); } /**