Skip to content

ForgottenDouble

Rasuvaeff\Understudy\Exception\ForgottenDouble

ClassPackage: rasuvaeff/understudySourceVersion: 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): self

onPurpose()

php
static onPurpose(non-empty-string $method): self

propertyAfterReset()

php
static propertyAfterReset(non-empty-string $property): self

retired()

php
static retired(): self

fromDefaultFactory()

php
static fromDefaultFactory(class-string $contract): self