Specify closure this for extend

This commit is contained in:
Hans van Luttikhuizen-Ross
2025-10-29 11:13:50 +01:00
parent 08b09f2e98
commit b7b16096db
2 changed files with 6 additions and 0 deletions

View File

@ -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
{

View File

@ -52,7 +52,9 @@ use ReflectionProperty;
*/
final class Expectation
{
/** @use Extendable<self<TValue>> */
use Extendable;
use Pipeable;
use Retrievable;