Merge pull request #1554 from pindab0ter/feature/extend-closure-this

Specify closure this for extend
This commit is contained in:
nuno maduro
2026-01-13 01:19:47 +00:00
committed by GitHub
2 changed files with 6 additions and 0 deletions

View File

@ -8,6 +8,8 @@ use Closure;
/** /**
* @internal * @internal
*
* @template T of object
*/ */
trait Extendable trait Extendable
{ {
@ -20,6 +22,8 @@ trait Extendable
/** /**
* Register a new extend. * Register a new extend.
*
* @param-closure-this T $extend
*/ */
public function extend(string $name, Closure $extend): void public function extend(string $name, Closure $extend): void
{ {

View File

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