From cdbee13e11663c4bdcfd770a94d7782246110905 Mon Sep 17 00:00:00 2001 From: Benjamin Blake Date: Fri, 28 Feb 2020 12:01:46 -0700 Subject: [PATCH] Updated RequestChanable Interface and Trait + Fixed an error that was caused by the use of the "self" type-hint in a trait + Added more type-hints to the `setCaller()` method --- src/Core/Interfaces/RequestChainableInterface.php | 2 +- src/Core/Traits/RequestChainable.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Core/Interfaces/RequestChainableInterface.php b/src/Core/Interfaces/RequestChainableInterface.php index c1ecf0f..5cf32a2 100644 --- a/src/Core/Interfaces/RequestChainableInterface.php +++ b/src/Core/Interfaces/RequestChainableInterface.php @@ -28,7 +28,7 @@ interface RequestChainableInterface * * @return self */ - public function setCaller($object): self; + public function setCaller(?object $object); /** * Return the request chain heirarchy diff --git a/src/Core/Traits/RequestChainable.php b/src/Core/Traits/RequestChainable.php index 1d37f08..7721295 100644 --- a/src/Core/Traits/RequestChainable.php +++ b/src/Core/Traits/RequestChainable.php @@ -40,7 +40,7 @@ trait RequestChainable * * @return self */ - public function setCaller($object): self + public function setCaller(?object $object) { $this->caller = $object; return $this;