diff --git a/src/Concerns/Extendable.php b/src/Concerns/Extendable.php index a2f7e40b..1ff6626b 100644 --- a/src/Concerns/Extendable.php +++ b/src/Concerns/Extendable.php @@ -8,6 +8,8 @@ use Closure; /** * @internal + * + * @template T of object */ trait Extendable { @@ -20,6 +22,8 @@ trait Extendable /** * Register a new extend. + * + * @param-closure-this T $extend */ public function extend(string $name, Closure $extend): void { diff --git a/src/Expectation.php b/src/Expectation.php index 8091ad82..50729d7a 100644 --- a/src/Expectation.php +++ b/src/Expectation.php @@ -52,7 +52,9 @@ use ReflectionProperty; */ final class Expectation { + /** @use Extendable> */ use Extendable; + use Pipeable; use Retrievable;