ForgottenDouble
Rasuvaeff\Understudy\Exception\ForgottenDouble
Class — Package: rasuvaeff/understudy — Source — Version: v0.4.1
Extends: LogicException
Implements: Throwable, Stringable, Exception\UnderstudyError
A double outlived the context that created it — almost always a double kept in a static property or a shared fixture across Understudy::reset().
Answering with null instead would violate the declared return type of any non-nullable method and surface far from the actual mistake.
Methods
afterReset()
php
static afterReset(non-empty-string $method): selfonPurpose()
php
static onPurpose(non-empty-string $method): selfpropertyAfterReset()
php
static propertyAfterReset(non-empty-string $property): selfretired()
php
static retired(): selffromDefaultFactory()
php
static fromDefaultFactory(class-string $contract): self