From 4966316bd9456f4ca10812a35a82a5d5e2334f5f Mon Sep 17 00:00:00 2001 From: Sasa Blagojevic Date: Fri, 4 Feb 2022 10:34:25 +0100 Subject: [PATCH] Clean up and bump version --- .gitignore | 1 + composer.json | 2 +- src/Response/Concerns/CanDelegate.php | 10 +++------- tests/TestHandler.php | 5 ----- 4 files changed, 5 insertions(+), 13 deletions(-) diff --git a/.gitignore b/.gitignore index d9d5900..e9a1321 100644 --- a/.gitignore +++ b/.gitignore @@ -3,3 +3,4 @@ vendor/ tools/vendor .php-cs-fixer.cache +.phpunit.result.cache diff --git a/composer.json b/composer.json index 83f5087..eef0d37 100644 --- a/composer.json +++ b/composer.json @@ -6,7 +6,7 @@ "php", "command-bus" ], - "version": "1.3.1", + "version": "1.3.2", "license": "MIT", "authors": [ { diff --git a/src/Response/Concerns/CanDelegate.php b/src/Response/Concerns/CanDelegate.php index be999c8..4e9caf7 100644 --- a/src/Response/Concerns/CanDelegate.php +++ b/src/Response/Concerns/CanDelegate.php @@ -12,13 +12,9 @@ use SasaB\CommandBus\Exceptions\ImmutableException; -/** - * @template TT - * @mixin TT - */ trait CanDelegate { - public function __get(string $name) + public function __get(string $name): mixed { return $this->content->{$name} ?? null; } @@ -31,12 +27,12 @@ public function __isset(string $name): bool /** * @throws ImmutableException */ - public function __set(string $property, mixed $value) + public function __set(string $property, mixed $value): void { throw ImmutableException::mutating(__CLASS__); } - public function __call(string $name, array $arguments) + public function __call(string $name, array $arguments): mixed { return $this->content->{$name}(...$arguments); } diff --git a/tests/TestHandler.php b/tests/TestHandler.php index 137ebc9..525aba7 100644 --- a/tests/TestHandler.php +++ b/tests/TestHandler.php @@ -18,11 +18,6 @@ */ final class TestHandler implements Handler { - /** - * @template T - * @param Command $command - * @return mixed - */ public function handle(Command $command): mixed { return $command->payload();