repo stringlengths 7 63 | file_url stringlengths 81 284 | file_path stringlengths 5 200 | content stringlengths 0 32.8k | language stringclasses 1
value | license stringclasses 7
values | commit_sha stringlengths 40 40 | retrieved_at stringdate 2026-01-04 15:02:33 2026-01-05 05:24:06 | truncated bool 2
classes |
|---|---|---|---|---|---|---|---|---|
eloquent/phony | https://github.com/eloquent/phony/blob/3d093d78e83fa5066559854505f01b6ea19af12e/src/Mock/Builder/Method/MethodDefinition.php | src/Mock/Builder/Method/MethodDefinition.php | <?php
declare(strict_types=1);
namespace Eloquent\Phony\Mock\Builder\Method;
use ReflectionFunctionAbstract;
/**
* The interface implemented by method definitions.
*/
interface MethodDefinition
{
/**
* Returns true if this method is callable.
*
* @return bool True if this method is callable.
... | php | MIT | 3d093d78e83fa5066559854505f01b6ea19af12e | 2026-01-05T02:35:49.024953Z | false |
eloquent/phony | https://github.com/eloquent/phony/blob/3d093d78e83fa5066559854505f01b6ea19af12e/src/Mock/Exception/FinalClassException.php | src/Mock/Exception/FinalClassException.php | <?php
declare(strict_types=1);
namespace Eloquent\Phony\Mock\Exception;
use Exception;
/**
* Unable to extend final class.
*/
final class FinalClassException extends Exception implements
MockException
{
/**
* Construct a final class exception.
*
* @param string $className The class name.
... | php | MIT | 3d093d78e83fa5066559854505f01b6ea19af12e | 2026-01-05T02:35:49.024953Z | false |
eloquent/phony | https://github.com/eloquent/phony/blob/3d093d78e83fa5066559854505f01b6ea19af12e/src/Mock/Exception/ClassExistsException.php | src/Mock/Exception/ClassExistsException.php | <?php
declare(strict_types=1);
namespace Eloquent\Phony\Mock\Exception;
use Exception;
/**
* The class is already defined.
*/
final class ClassExistsException extends Exception implements
MockException
{
/**
* Construct a class exists exception.
*
* @param string $className The class name.
... | php | MIT | 3d093d78e83fa5066559854505f01b6ea19af12e | 2026-01-05T02:35:49.024953Z | false |
eloquent/phony | https://github.com/eloquent/phony/blob/3d093d78e83fa5066559854505f01b6ea19af12e/src/Mock/Exception/NonMockClassException.php | src/Mock/Exception/NonMockClassException.php | <?php
declare(strict_types=1);
namespace Eloquent\Phony\Mock\Exception;
use Exception;
use Throwable;
/**
* The supplied class is not a mock class.
*/
final class NonMockClassException extends Exception implements
MockException
{
/**
* Construct a non-mock class exception.
*
* @param string... | php | MIT | 3d093d78e83fa5066559854505f01b6ea19af12e | 2026-01-05T02:35:49.024953Z | false |
eloquent/phony | https://github.com/eloquent/phony/blob/3d093d78e83fa5066559854505f01b6ea19af12e/src/Mock/Exception/InvalidTypeException.php | src/Mock/Exception/InvalidTypeException.php | <?php
declare(strict_types=1);
namespace Eloquent\Phony\Mock\Exception;
use Exception;
use Throwable;
/**
* Unable to add the supplied type.
*/
final class InvalidTypeException extends Exception implements
MockException
{
/**
* Construct a new invalid type exception.
*
* @param mixed $... | php | MIT | 3d093d78e83fa5066559854505f01b6ea19af12e | 2026-01-05T02:35:49.024953Z | false |
eloquent/phony | https://github.com/eloquent/phony/blob/3d093d78e83fa5066559854505f01b6ea19af12e/src/Mock/Exception/InvalidDefinitionException.php | src/Mock/Exception/InvalidDefinitionException.php | <?php
declare(strict_types=1);
namespace Eloquent\Phony\Mock\Exception;
use Exception;
/**
* An invalid definition was encountered.
*/
final class InvalidDefinitionException extends Exception implements
MockException
{
/**
* Construct a new invalid definition exception.
*
* @param mixed $na... | php | MIT | 3d093d78e83fa5066559854505f01b6ea19af12e | 2026-01-05T02:35:49.024953Z | false |
eloquent/phony | https://github.com/eloquent/phony/blob/3d093d78e83fa5066559854505f01b6ea19af12e/src/Mock/Exception/InvalidMockClassException.php | src/Mock/Exception/InvalidMockClassException.php | <?php
declare(strict_types=1);
namespace Eloquent\Phony\Mock\Exception;
use Exception;
/**
* The supplied value is not a mock class.
*/
final class InvalidMockClassException extends Exception implements
MockException
{
/**
* Construct a new invalid mock class exception.
*
* @param mixed $va... | php | MIT | 3d093d78e83fa5066559854505f01b6ea19af12e | 2026-01-05T02:35:49.024953Z | false |
eloquent/phony | https://github.com/eloquent/phony/blob/3d093d78e83fa5066559854505f01b6ea19af12e/src/Mock/Exception/MultipleInheritanceException.php | src/Mock/Exception/MultipleInheritanceException.php | <?php
declare(strict_types=1);
namespace Eloquent\Phony\Mock\Exception;
use Exception;
/**
* Unable to extend multiple classes.
*/
final class MultipleInheritanceException extends Exception implements
MockException
{
/**
* Construct a multiple inheritance exception.
*
* @param array<int,str... | php | MIT | 3d093d78e83fa5066559854505f01b6ea19af12e | 2026-01-05T02:35:49.024953Z | false |
eloquent/phony | https://github.com/eloquent/phony/blob/3d093d78e83fa5066559854505f01b6ea19af12e/src/Mock/Exception/InvalidClassNameException.php | src/Mock/Exception/InvalidClassNameException.php | <?php
declare(strict_types=1);
namespace Eloquent\Phony\Mock\Exception;
use Exception;
/**
* The supplied class name is invalid.
*/
final class InvalidClassNameException extends Exception implements
MockException
{
/**
* Construct a new invalid class name exception.
*
* @param mixed $classN... | php | MIT | 3d093d78e83fa5066559854505f01b6ea19af12e | 2026-01-05T02:35:49.024953Z | false |
eloquent/phony | https://github.com/eloquent/phony/blob/3d093d78e83fa5066559854505f01b6ea19af12e/src/Mock/Exception/InvalidMockException.php | src/Mock/Exception/InvalidMockException.php | <?php
declare(strict_types=1);
namespace Eloquent\Phony\Mock\Exception;
use Exception;
/**
* The supplied value is not a mock.
*/
final class InvalidMockException extends Exception implements
MockException
{
/**
* Construct a new invalid mock exception.
*
* @param mixed $value The value.
... | php | MIT | 3d093d78e83fa5066559854505f01b6ea19af12e | 2026-01-05T02:35:49.024953Z | false |
eloquent/phony | https://github.com/eloquent/phony/blob/3d093d78e83fa5066559854505f01b6ea19af12e/src/Mock/Exception/MockGenerationFailedException.php | src/Mock/Exception/MockGenerationFailedException.php | <?php
declare(strict_types=1);
namespace Eloquent\Phony\Mock\Exception;
use Eloquent\Phony\Mock\Builder\MockDefinition;
use Exception;
use Throwable;
/**
* Mock generation failed.
*/
final class MockGenerationFailedException extends Exception implements
MockException
{
/**
* Construct a mock generati... | php | MIT | 3d093d78e83fa5066559854505f01b6ea19af12e | 2026-01-05T02:35:49.024953Z | false |
eloquent/phony | https://github.com/eloquent/phony/blob/3d093d78e83fa5066559854505f01b6ea19af12e/src/Mock/Exception/AnonymousClassException.php | src/Mock/Exception/AnonymousClassException.php | <?php
declare(strict_types=1);
namespace Eloquent\Phony\Mock\Exception;
use Exception;
/**
* Anonymous classes cannot be mocked.
*/
final class AnonymousClassException extends Exception implements MockException
{
/**
* Construct an anonymous class exception.
*/
public function __construct()
... | php | MIT | 3d093d78e83fa5066559854505f01b6ea19af12e | 2026-01-05T02:35:49.024953Z | false |
eloquent/phony | https://github.com/eloquent/phony/blob/3d093d78e83fa5066559854505f01b6ea19af12e/src/Mock/Exception/FinalMethodStubException.php | src/Mock/Exception/FinalMethodStubException.php | <?php
declare(strict_types=1);
namespace Eloquent\Phony\Mock\Exception;
use Exception;
/**
* The method cannot be stubbed because it is final.
*/
final class FinalMethodStubException extends Exception implements
MockException
{
/**
* Construct a new final method stub exception.
*
* @param s... | php | MIT | 3d093d78e83fa5066559854505f01b6ea19af12e | 2026-01-05T02:35:49.024953Z | false |
eloquent/phony | https://github.com/eloquent/phony/blob/3d093d78e83fa5066559854505f01b6ea19af12e/src/Mock/Exception/MockException.php | src/Mock/Exception/MockException.php | <?php
declare(strict_types=1);
namespace Eloquent\Phony\Mock\Exception;
/**
* The interface used to identify mock exceptions.
*/
interface MockException
{
}
| php | MIT | 3d093d78e83fa5066559854505f01b6ea19af12e | 2026-01-05T02:35:49.024953Z | false |
eloquent/phony | https://github.com/eloquent/phony/blob/3d093d78e83fa5066559854505f01b6ea19af12e/src/Mock/Exception/FinalizedMockException.php | src/Mock/Exception/FinalizedMockException.php | <?php
declare(strict_types=1);
namespace Eloquent\Phony\Mock\Exception;
use Exception;
/**
* Unable to modify a finalized mock.
*/
final class FinalizedMockException extends Exception implements
MockException
{
/**
* Construct a finalized mock exception.
*/
public function __construct()
... | php | MIT | 3d093d78e83fa5066559854505f01b6ea19af12e | 2026-01-05T02:35:49.024953Z | false |
eloquent/phony | https://github.com/eloquent/phony/blob/3d093d78e83fa5066559854505f01b6ea19af12e/src/Mock/Exception/UndefinedMethodStubException.php | src/Mock/Exception/UndefinedMethodStubException.php | <?php
declare(strict_types=1);
namespace Eloquent\Phony\Mock\Exception;
use Exception;
/**
* The requested method stub does not exist.
*/
final class UndefinedMethodStubException extends Exception implements
MockException
{
/**
* Construct a new undefined method stub exception.
*
* @param s... | php | MIT | 3d093d78e83fa5066559854505f01b6ea19af12e | 2026-01-05T02:35:49.024953Z | false |
eloquent/phony | https://github.com/eloquent/phony/blob/3d093d78e83fa5066559854505f01b6ea19af12e/src/Mock/Method/WrappedMethod.php | src/Mock/Method/WrappedMethod.php | <?php
declare(strict_types=1);
namespace Eloquent\Phony\Mock\Method;
use Eloquent\Phony\Invocation\WrappedInvocable;
use Eloquent\Phony\Mock\Handle\Handle;
use Eloquent\Phony\Mock\Mock;
use ReflectionMethod;
/**
* The interface implemented by wrapped methods.
*/
interface WrappedMethod extends WrappedInvocable
{
... | php | MIT | 3d093d78e83fa5066559854505f01b6ea19af12e | 2026-01-05T02:35:49.024953Z | false |
eloquent/phony | https://github.com/eloquent/phony/blob/3d093d78e83fa5066559854505f01b6ea19af12e/src/Mock/Method/WrappedCustomMethod.php | src/Mock/Method/WrappedCustomMethod.php | <?php
declare(strict_types=1);
namespace Eloquent\Phony\Mock\Method;
use Eloquent\Phony\Call\Arguments;
use Eloquent\Phony\Invocation\Invoker;
use Eloquent\Phony\Mock\Handle\Handle;
use ReflectionMethod;
use Throwable;
/**
* A wrapper for custom methods.
*/
class WrappedCustomMethod implements WrappedMethod
{
... | php | MIT | 3d093d78e83fa5066559854505f01b6ea19af12e | 2026-01-05T02:35:49.024953Z | false |
eloquent/phony | https://github.com/eloquent/phony/blob/3d093d78e83fa5066559854505f01b6ea19af12e/src/Mock/Method/WrappedParentMethod.php | src/Mock/Method/WrappedParentMethod.php | <?php
declare(strict_types=1);
namespace Eloquent\Phony\Mock\Method;
use Eloquent\Phony\Call\Arguments;
use Eloquent\Phony\Mock\Handle\Handle;
use ReflectionMethod;
use Throwable;
/**
* A wrapper that allows calling of the parent method in mocks.
*/
class WrappedParentMethod implements WrappedMethod
{
use Wra... | php | MIT | 3d093d78e83fa5066559854505f01b6ea19af12e | 2026-01-05T02:35:49.024953Z | false |
eloquent/phony | https://github.com/eloquent/phony/blob/3d093d78e83fa5066559854505f01b6ea19af12e/src/Mock/Method/WrappedUncallableMethod.php | src/Mock/Method/WrappedUncallableMethod.php | <?php
declare(strict_types=1);
namespace Eloquent\Phony\Mock\Method;
use Eloquent\Phony\Call\Arguments;
use Eloquent\Phony\Mock\Handle\Handle;
use ReflectionMethod;
use Throwable;
/**
* A wrapper for uncallable methods.
*/
class WrappedUncallableMethod implements WrappedMethod
{
use WrappedMethodTrait;
/... | php | MIT | 3d093d78e83fa5066559854505f01b6ea19af12e | 2026-01-05T02:35:49.024953Z | false |
eloquent/phony | https://github.com/eloquent/phony/blob/3d093d78e83fa5066559854505f01b6ea19af12e/src/Mock/Method/WrappedMethodTrait.php | src/Mock/Method/WrappedMethodTrait.php | <?php
declare(strict_types=1);
namespace Eloquent\Phony\Mock\Method;
use Eloquent\Phony\Invocation\WrappedInvocableTrait;
use Eloquent\Phony\Mock\Handle\Handle;
use Eloquent\Phony\Mock\Handle\InstanceHandle;
use Eloquent\Phony\Mock\Handle\StaticHandle;
use Eloquent\Phony\Mock\Mock;
use ReflectionMethod;
/**
* Used... | php | MIT | 3d093d78e83fa5066559854505f01b6ea19af12e | 2026-01-05T02:35:49.024953Z | false |
eloquent/phony | https://github.com/eloquent/phony/blob/3d093d78e83fa5066559854505f01b6ea19af12e/src/Mock/Method/WrappedTraitMethod.php | src/Mock/Method/WrappedTraitMethod.php | <?php
declare(strict_types=1);
namespace Eloquent\Phony\Mock\Method;
use Eloquent\Phony\Call\Arguments;
use Eloquent\Phony\Mock\Handle\Handle;
use ReflectionMethod;
use Throwable;
/**
* A wrapper that allows calling of the trait method in mocks.
*/
class WrappedTraitMethod implements WrappedMethod
{
use Wrapp... | php | MIT | 3d093d78e83fa5066559854505f01b6ea19af12e | 2026-01-05T02:35:49.024953Z | false |
eloquent/phony | https://github.com/eloquent/phony/blob/3d093d78e83fa5066559854505f01b6ea19af12e/src/Mock/Method/WrappedMagicMethod.php | src/Mock/Method/WrappedMagicMethod.php | <?php
declare(strict_types=1);
namespace Eloquent\Phony\Mock\Method;
use Eloquent\Phony\Call\Arguments;
use Eloquent\Phony\Mock\Handle\Handle;
use Eloquent\Phony\Mock\Handle\InstanceHandle;
use Eloquent\Phony\Mock\Handle\StaticHandle;
use ReflectionMethod;
use Throwable;
/**
* A wrapper that allows calling of the ... | php | MIT | 3d093d78e83fa5066559854505f01b6ea19af12e | 2026-01-05T02:35:49.024953Z | false |
eloquent/phony | https://github.com/eloquent/phony/blob/3d093d78e83fa5066559854505f01b6ea19af12e/src/Sequencer/Sequencer.php | src/Sequencer/Sequencer.php | <?php
declare(strict_types=1);
namespace Eloquent\Phony\Sequencer;
/**
* Provides a sequential series of numbers.
*/
class Sequencer
{
/**
* Get a sequencer for a named sequence.
*
* @param string $name The sequence name.
*
* @return Sequencer The sequencer.
*/
public static f... | php | MIT | 3d093d78e83fa5066559854505f01b6ea19af12e | 2026-01-05T02:35:49.024953Z | false |
eloquent/phony | https://github.com/eloquent/phony/blob/3d093d78e83fa5066559854505f01b6ea19af12e/src/Difference/DifferenceEngine.php | src/Difference/DifferenceEngine.php | <?php
declare(strict_types=1);
namespace Eloquent\Phony\Difference;
use Eloquent\Phony\Reflection\FeatureDetector;
/**
* Calculates differences in values.
*/
class DifferenceEngine
{
/**
* Construct a new difference engine.
*
* @param FeatureDetector $featureDetector The feature detector to use... | php | MIT | 3d093d78e83fa5066559854505f01b6ea19af12e | 2026-01-05T02:35:49.024953Z | false |
eloquent/phony | https://github.com/eloquent/phony/blob/3d093d78e83fa5066559854505f01b6ea19af12e/src/Difference/DifferenceSequenceMatcher.php | src/Difference/DifferenceSequenceMatcher.php | <?php
declare(strict_types=1);
namespace Eloquent\Phony\Difference;
/**
* Sequence matcher source code originally taken from the php-diff package.
*
* Copyright (c) 2009 Chris Boulton <chris.boulton@interspire.com>
*
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without... | php | MIT | 3d093d78e83fa5066559854505f01b6ea19af12e | 2026-01-05T02:35:49.024953Z | false |
eloquent/phony | https://github.com/eloquent/phony/blob/3d093d78e83fa5066559854505f01b6ea19af12e/src/Call/CallVerifier.php | src/Call/CallVerifier.php | <?php
declare(strict_types=1);
namespace Eloquent\Phony\Call;
use Eloquent\Phony\Assertion\AssertionRecorder;
use Eloquent\Phony\Assertion\AssertionRenderer;
use Eloquent\Phony\Call\Event\CalledEvent;
use Eloquent\Phony\Call\Event\EndEvent;
use Eloquent\Phony\Call\Event\IterableEvent;
use Eloquent\Phony\Call\Event\R... | php | MIT | 3d093d78e83fa5066559854505f01b6ea19af12e | 2026-01-05T02:35:49.024953Z | false |
eloquent/phony | https://github.com/eloquent/phony/blob/3d093d78e83fa5066559854505f01b6ea19af12e/src/Call/CallVerifierFactory.php | src/Call/CallVerifierFactory.php | <?php
declare(strict_types=1);
namespace Eloquent\Phony\Call;
use Eloquent\Phony\Assertion\AssertionRecorder;
use Eloquent\Phony\Assertion\AssertionRenderer;
use Eloquent\Phony\Matcher\MatcherFactory;
use Eloquent\Phony\Matcher\MatcherVerifier;
use Eloquent\Phony\Verification\GeneratorVerifierFactory;
use Eloquent\P... | php | MIT | 3d093d78e83fa5066559854505f01b6ea19af12e | 2026-01-05T02:35:49.024953Z | false |
eloquent/phony | https://github.com/eloquent/phony/blob/3d093d78e83fa5066559854505f01b6ea19af12e/src/Call/Arguments.php | src/Call/Arguments.php | <?php
declare(strict_types=1);
namespace Eloquent\Phony\Call;
use ArrayIterator;
use Countable;
use Eloquent\Phony\Call\Exception\UndefinedArgumentException;
use Eloquent\Phony\Collection\NormalizesIndices;
use Iterator;
use IteratorAggregate;
/**
* Represents a set of call arguments.
*
* @implements IteratorAgg... | php | MIT | 3d093d78e83fa5066559854505f01b6ea19af12e | 2026-01-05T02:35:49.024953Z | false |
eloquent/phony | https://github.com/eloquent/phony/blob/3d093d78e83fa5066559854505f01b6ea19af12e/src/Call/Call.php | src/Call/Call.php | <?php
declare(strict_types=1);
namespace Eloquent\Phony\Call;
use Eloquent\Phony\Call\Event\CalledEvent;
use Eloquent\Phony\Call\Event\EndEvent;
use Eloquent\Phony\Call\Event\IterableEvent;
use Eloquent\Phony\Call\Event\ResponseEvent;
use Eloquent\Phony\Call\Exception\UndefinedArgumentException;
use Eloquent\Phony\C... | php | MIT | 3d093d78e83fa5066559854505f01b6ea19af12e | 2026-01-05T02:35:49.024953Z | false |
eloquent/phony | https://github.com/eloquent/phony/blob/3d093d78e83fa5066559854505f01b6ea19af12e/src/Call/CallFactory.php | src/Call/CallFactory.php | <?php
declare(strict_types=1);
namespace Eloquent\Phony\Call;
use Eloquent\Phony\Call\Event\CallEventFactory;
use Eloquent\Phony\Invocation\Invoker;
use Eloquent\Phony\Spy\SpyData;
use Throwable;
/**
* Creates calls.
*/
class CallFactory
{
/**
* Construct a new call factory.
*
* @param CallEven... | php | MIT | 3d093d78e83fa5066559854505f01b6ea19af12e | 2026-01-05T02:35:49.024953Z | false |
eloquent/phony | https://github.com/eloquent/phony/blob/3d093d78e83fa5066559854505f01b6ea19af12e/src/Call/CallData.php | src/Call/CallData.php | <?php
declare(strict_types=1);
namespace Eloquent\Phony\Call;
use ArrayIterator;
use Eloquent\Phony\Call\Event\CalledEvent;
use Eloquent\Phony\Call\Event\EndEvent;
use Eloquent\Phony\Call\Event\IterableEvent;
use Eloquent\Phony\Call\Event\ResponseEvent;
use Eloquent\Phony\Call\Event\ReturnedEvent;
use Eloquent\Phony... | php | MIT | 3d093d78e83fa5066559854505f01b6ea19af12e | 2026-01-05T02:35:49.024953Z | false |
eloquent/phony | https://github.com/eloquent/phony/blob/3d093d78e83fa5066559854505f01b6ea19af12e/src/Call/Event/ReceivedExceptionEvent.php | src/Call/Event/ReceivedExceptionEvent.php | <?php
declare(strict_types=1);
namespace Eloquent\Phony\Call\Event;
use Throwable;
/**
* Represents an exception received by a generator.
*/
class ReceivedExceptionEvent implements IterableEvent
{
use CallEventTrait;
/**
* Construct a 'received exception' event.
*
* @param int $seque... | php | MIT | 3d093d78e83fa5066559854505f01b6ea19af12e | 2026-01-05T02:35:49.024953Z | false |
eloquent/phony | https://github.com/eloquent/phony/blob/3d093d78e83fa5066559854505f01b6ea19af12e/src/Call/Event/ThrewEvent.php | src/Call/Event/ThrewEvent.php | <?php
declare(strict_types=1);
namespace Eloquent\Phony\Call\Event;
use Throwable;
/**
* Represents the end of a call by throwing an exception.
*/
class ThrewEvent implements ResponseEvent
{
use CallEventTrait;
/**
* Construct a 'threw' event.
*
* @param int $sequenceNumber The seque... | php | MIT | 3d093d78e83fa5066559854505f01b6ea19af12e | 2026-01-05T02:35:49.024953Z | false |
eloquent/phony | https://github.com/eloquent/phony/blob/3d093d78e83fa5066559854505f01b6ea19af12e/src/Call/Event/ReceivedEvent.php | src/Call/Event/ReceivedEvent.php | <?php
declare(strict_types=1);
namespace Eloquent\Phony\Call\Event;
/**
* Represents a value received by a generator.
*/
class ReceivedEvent implements IterableEvent
{
use CallEventTrait;
/**
* Construct a 'received' event.
*
* @param int $sequenceNumber The sequence number.
* @param... | php | MIT | 3d093d78e83fa5066559854505f01b6ea19af12e | 2026-01-05T02:35:49.024953Z | false |
eloquent/phony | https://github.com/eloquent/phony/blob/3d093d78e83fa5066559854505f01b6ea19af12e/src/Call/Event/CalledEvent.php | src/Call/Event/CalledEvent.php | <?php
declare(strict_types=1);
namespace Eloquent\Phony\Call\Event;
use Eloquent\Phony\Call\Arguments;
/**
* Represents the start of a call.
*/
class CalledEvent implements CallEvent
{
use CallEventTrait;
/**
* Construct a new 'called' event.
*
* @param int $sequenceNumber The sequen... | php | MIT | 3d093d78e83fa5066559854505f01b6ea19af12e | 2026-01-05T02:35:49.024953Z | false |
eloquent/phony | https://github.com/eloquent/phony/blob/3d093d78e83fa5066559854505f01b6ea19af12e/src/Call/Event/CallEventTrait.php | src/Call/Event/CallEventTrait.php | <?php
declare(strict_types=1);
namespace Eloquent\Phony\Call\Event;
use Eloquent\Phony\Call\Call;
/**
* Used for implementing call events.
*/
trait CallEventTrait
{
/**
* Get the sequence number.
*
* The sequence number is a unique number assigned to every event that Phony
* records. The n... | php | MIT | 3d093d78e83fa5066559854505f01b6ea19af12e | 2026-01-05T02:35:49.024953Z | false |
eloquent/phony | https://github.com/eloquent/phony/blob/3d093d78e83fa5066559854505f01b6ea19af12e/src/Call/Event/ResponseEvent.php | src/Call/Event/ResponseEvent.php | <?php
declare(strict_types=1);
namespace Eloquent\Phony\Call\Event;
/**
* The interface used to identify response events.
*/
interface ResponseEvent extends EndEvent
{
}
| php | MIT | 3d093d78e83fa5066559854505f01b6ea19af12e | 2026-01-05T02:35:49.024953Z | false |
eloquent/phony | https://github.com/eloquent/phony/blob/3d093d78e83fa5066559854505f01b6ea19af12e/src/Call/Event/ConsumedEvent.php | src/Call/Event/ConsumedEvent.php | <?php
declare(strict_types=1);
namespace Eloquent\Phony\Call\Event;
/**
* Represents the end of iteration of a returned value.
*/
class ConsumedEvent implements EndEvent
{
use CallEventTrait;
/**
* Construct a new 'consumed' event.
*
* @param int $sequenceNumber The sequence number.
... | php | MIT | 3d093d78e83fa5066559854505f01b6ea19af12e | 2026-01-05T02:35:49.024953Z | false |
eloquent/phony | https://github.com/eloquent/phony/blob/3d093d78e83fa5066559854505f01b6ea19af12e/src/Call/Event/EndEvent.php | src/Call/Event/EndEvent.php | <?php
declare(strict_types=1);
namespace Eloquent\Phony\Call\Event;
/**
* The interface used to identify end events.
*/
interface EndEvent extends CallEvent
{
}
| php | MIT | 3d093d78e83fa5066559854505f01b6ea19af12e | 2026-01-05T02:35:49.024953Z | false |
eloquent/phony | https://github.com/eloquent/phony/blob/3d093d78e83fa5066559854505f01b6ea19af12e/src/Call/Event/ProducedEvent.php | src/Call/Event/ProducedEvent.php | <?php
declare(strict_types=1);
namespace Eloquent\Phony\Call\Event;
/**
* Represents a produced key-value pair.
*/
class ProducedEvent implements IterableEvent
{
use CallEventTrait;
/**
* Construct a 'produced' event.
*
* @param int $sequenceNumber The sequence number.
* @param float... | php | MIT | 3d093d78e83fa5066559854505f01b6ea19af12e | 2026-01-05T02:35:49.024953Z | false |
eloquent/phony | https://github.com/eloquent/phony/blob/3d093d78e83fa5066559854505f01b6ea19af12e/src/Call/Event/UsedEvent.php | src/Call/Event/UsedEvent.php | <?php
declare(strict_types=1);
namespace Eloquent\Phony\Call\Event;
/**
* Represents the start of iteration of a returned value.
*/
class UsedEvent implements IterableEvent
{
use CallEventTrait;
/**
* Construct a new 'used' event.
*
* @param int $sequenceNumber The sequence number.
*... | php | MIT | 3d093d78e83fa5066559854505f01b6ea19af12e | 2026-01-05T02:35:49.024953Z | false |
eloquent/phony | https://github.com/eloquent/phony/blob/3d093d78e83fa5066559854505f01b6ea19af12e/src/Call/Event/ReturnedEvent.php | src/Call/Event/ReturnedEvent.php | <?php
declare(strict_types=1);
namespace Eloquent\Phony\Call\Event;
/**
* Represents the end of a call by returning a value.
*/
class ReturnedEvent implements ResponseEvent
{
use CallEventTrait;
/**
* Construct a 'returned' event.
*
* @param int $sequenceNumber The sequence number.
*... | php | MIT | 3d093d78e83fa5066559854505f01b6ea19af12e | 2026-01-05T02:35:49.024953Z | false |
eloquent/phony | https://github.com/eloquent/phony/blob/3d093d78e83fa5066559854505f01b6ea19af12e/src/Call/Event/CallEvent.php | src/Call/Event/CallEvent.php | <?php
declare(strict_types=1);
namespace Eloquent\Phony\Call\Event;
use Eloquent\Phony\Call\Call;
use Eloquent\Phony\Event\Event;
/**
* The interface implemented by call events.
*/
interface CallEvent extends Event
{
/**
* Set the call.
*
* @param Call $call The call.
*
* @return $thi... | php | MIT | 3d093d78e83fa5066559854505f01b6ea19af12e | 2026-01-05T02:35:49.024953Z | false |
eloquent/phony | https://github.com/eloquent/phony/blob/3d093d78e83fa5066559854505f01b6ea19af12e/src/Call/Event/CallEventFactory.php | src/Call/Event/CallEventFactory.php | <?php
declare(strict_types=1);
namespace Eloquent\Phony\Call\Event;
use Eloquent\Phony\Call\Arguments;
use Eloquent\Phony\Clock\Clock;
use Eloquent\Phony\Sequencer\Sequencer;
use Throwable;
/**
* Creates call events.
*/
class CallEventFactory
{
/**
* Construct a new call event factory.
*
* @par... | php | MIT | 3d093d78e83fa5066559854505f01b6ea19af12e | 2026-01-05T02:35:49.024953Z | false |
eloquent/phony | https://github.com/eloquent/phony/blob/3d093d78e83fa5066559854505f01b6ea19af12e/src/Call/Event/IterableEvent.php | src/Call/Event/IterableEvent.php | <?php
declare(strict_types=1);
namespace Eloquent\Phony\Call\Event;
/**
* The interface used to identify iterable events.
*/
interface IterableEvent extends CallEvent
{
}
| php | MIT | 3d093d78e83fa5066559854505f01b6ea19af12e | 2026-01-05T02:35:49.024953Z | false |
eloquent/phony | https://github.com/eloquent/phony/blob/3d093d78e83fa5066559854505f01b6ea19af12e/src/Call/Exception/UndefinedCallException.php | src/Call/Exception/UndefinedCallException.php | <?php
declare(strict_types=1);
namespace Eloquent\Phony\Call\Exception;
use Exception;
/**
* An undefined call was requested.
*/
final class UndefinedCallException extends Exception
{
/**
* Construct a new undefined call exception.
*
* @param int $index The call index.
*/
public functi... | php | MIT | 3d093d78e83fa5066559854505f01b6ea19af12e | 2026-01-05T02:35:49.024953Z | false |
eloquent/phony | https://github.com/eloquent/phony/blob/3d093d78e83fa5066559854505f01b6ea19af12e/src/Call/Exception/UndefinedResponseException.php | src/Call/Exception/UndefinedResponseException.php | <?php
declare(strict_types=1);
namespace Eloquent\Phony\Call\Exception;
use Exception;
/**
* The call has not yet produced a response of the requested type.
*/
final class UndefinedResponseException extends Exception
{
/**
* Construct a new undefined return value exception.
*
* @param string $m... | php | MIT | 3d093d78e83fa5066559854505f01b6ea19af12e | 2026-01-05T02:35:49.024953Z | false |
eloquent/phony | https://github.com/eloquent/phony/blob/3d093d78e83fa5066559854505f01b6ea19af12e/src/Call/Exception/UndefinedArgumentException.php | src/Call/Exception/UndefinedArgumentException.php | <?php
declare(strict_types=1);
namespace Eloquent\Phony\Call\Exception;
use Exception;
/**
* Thrown when an argument that was requested by index does not exist.
*/
final class UndefinedArgumentException extends Exception
{
/**
* Construct a new undefined argument exception.
*
* @param int $inde... | php | MIT | 3d093d78e83fa5066559854505f01b6ea19af12e | 2026-01-05T02:35:49.024953Z | false |
eloquent/phony | https://github.com/eloquent/phony/blob/3d093d78e83fa5066559854505f01b6ea19af12e/src/Spy/SpyVerifier.php | src/Spy/SpyVerifier.php | <?php
declare(strict_types=1);
namespace Eloquent\Phony\Spy;
use ArrayIterator;
use Eloquent\Phony\Assertion\AssertionRecorder;
use Eloquent\Phony\Assertion\AssertionRenderer;
use Eloquent\Phony\Call\Arguments;
use Eloquent\Phony\Call\Call;
use Eloquent\Phony\Call\CallVerifier;
use Eloquent\Phony\Call\CallVerifierFa... | php | MIT | 3d093d78e83fa5066559854505f01b6ea19af12e | 2026-01-05T02:35:49.024953Z | false |
eloquent/phony | https://github.com/eloquent/phony/blob/3d093d78e83fa5066559854505f01b6ea19af12e/src/Spy/SpyFactory.php | src/Spy/SpyFactory.php | <?php
declare(strict_types=1);
namespace Eloquent\Phony\Spy;
use Eloquent\Phony\Call\CallFactory;
use Eloquent\Phony\Invocation\Invoker;
use Eloquent\Phony\Sequencer\Sequencer;
/**
* Creates spies.
*/
class SpyFactory
{
/**
* Construct a new spy factory.
*
* @param Sequencer $labelSeq... | php | MIT | 3d093d78e83fa5066559854505f01b6ea19af12e | 2026-01-05T02:35:49.024953Z | false |
eloquent/phony | https://github.com/eloquent/phony/blob/3d093d78e83fa5066559854505f01b6ea19af12e/src/Spy/GeneratorSpyMap.php | src/Spy/GeneratorSpyMap.php | <?php
declare(strict_types=1);
namespace Eloquent\Phony\Spy;
use Generator;
use WeakMap;
/**
* Maps generator spies to the original generator.
*/
class GeneratorSpyMap
{
/**
* Construct a new generator spy map.
*/
public function __construct()
{
$this->mapping = new WeakMap();
}
... | php | MIT | 3d093d78e83fa5066559854505f01b6ea19af12e | 2026-01-05T02:35:49.024953Z | false |
eloquent/phony | https://github.com/eloquent/phony/blob/3d093d78e83fa5066559854505f01b6ea19af12e/src/Spy/ArraySpy.php | src/Spy/ArraySpy.php | <?php
declare(strict_types=1);
namespace Eloquent\Phony\Spy;
use Eloquent\Phony\Call\Call;
use Eloquent\Phony\Call\Event\CallEventFactory;
/**
* Spies on an array.
*/
class ArraySpy implements IterableSpy
{
/**
* Construct a new array spy.
*
* @param Call $call The call ... | php | MIT | 3d093d78e83fa5066559854505f01b6ea19af12e | 2026-01-05T02:35:49.024953Z | false |
eloquent/phony | https://github.com/eloquent/phony/blob/3d093d78e83fa5066559854505f01b6ea19af12e/src/Spy/GeneratorSpyFactory.php | src/Spy/GeneratorSpyFactory.php | <?php
declare(strict_types=1);
namespace Eloquent\Phony\Spy;
use Eloquent\Phony\Call\Call;
use Eloquent\Phony\Call\Event\CallEventFactory;
use Generator;
use Throwable;
/**
* Creates generator spies.
*/
class GeneratorSpyFactory
{
/**
* Construct a new generator spy factory.
*
* @param CallEven... | php | MIT | 3d093d78e83fa5066559854505f01b6ea19af12e | 2026-01-05T02:35:49.024953Z | false |
eloquent/phony | https://github.com/eloquent/phony/blob/3d093d78e83fa5066559854505f01b6ea19af12e/src/Spy/IterableSpyFactory.php | src/Spy/IterableSpyFactory.php | <?php
declare(strict_types=1);
namespace Eloquent\Phony\Spy;
use Eloquent\Phony\Call\Call;
use Eloquent\Phony\Call\Event\CallEventFactory;
use InvalidArgumentException;
use Traversable;
/**
* Creates iterable spies.
*/
class IterableSpyFactory
{
/**
* Construct a new iterable spy factory.
*
* @... | php | MIT | 3d093d78e83fa5066559854505f01b6ea19af12e | 2026-01-05T02:35:49.024953Z | false |
eloquent/phony | https://github.com/eloquent/phony/blob/3d093d78e83fa5066559854505f01b6ea19af12e/src/Spy/SpyData.php | src/Spy/SpyData.php | <?php
declare(strict_types=1);
namespace Eloquent\Phony\Spy;
use ArrayIterator;
use Eloquent\Phony\Call\Arguments;
use Eloquent\Phony\Call\Call;
use Eloquent\Phony\Call\CallFactory;
use Eloquent\Phony\Call\Event\ReturnedEvent;
use Eloquent\Phony\Call\Event\ThrewEvent;
use Eloquent\Phony\Call\Exception\UndefinedCallE... | php | MIT | 3d093d78e83fa5066559854505f01b6ea19af12e | 2026-01-05T02:35:49.024953Z | false |
eloquent/phony | https://github.com/eloquent/phony/blob/3d093d78e83fa5066559854505f01b6ea19af12e/src/Spy/IterableSpy.php | src/Spy/IterableSpy.php | <?php
declare(strict_types=1);
namespace Eloquent\Phony\Spy;
use ArrayAccess;
use Countable;
use Iterator;
/**
* The interface implemented by iterable spies.
*
* @extends ArrayAccess<mixed,mixed>
* @extends Iterator<mixed>
*/
interface IterableSpy extends ArrayAccess, Countable, Iterator
{
/**
* Get t... | php | MIT | 3d093d78e83fa5066559854505f01b6ea19af12e | 2026-01-05T02:35:49.024953Z | false |
eloquent/phony | https://github.com/eloquent/phony/blob/3d093d78e83fa5066559854505f01b6ea19af12e/src/Spy/TraversableSpy.php | src/Spy/TraversableSpy.php | <?php
declare(strict_types=1);
namespace Eloquent\Phony\Spy;
use ArrayAccess;
use Countable;
use Eloquent\Phony\Call\Call;
use Eloquent\Phony\Call\Event\CallEventFactory;
use Eloquent\Phony\Spy\Exception\NonArrayAccessTraversableException;
use Eloquent\Phony\Spy\Exception\NonCountableTraversableException;
use Iterat... | php | MIT | 3d093d78e83fa5066559854505f01b6ea19af12e | 2026-01-05T02:35:49.024953Z | false |
eloquent/phony | https://github.com/eloquent/phony/blob/3d093d78e83fa5066559854505f01b6ea19af12e/src/Spy/SpyVerifierFactory.php | src/Spy/SpyVerifierFactory.php | <?php
declare(strict_types=1);
namespace Eloquent\Phony\Spy;
use Eloquent\Phony\Assertion\AssertionRecorder;
use Eloquent\Phony\Assertion\AssertionRenderer;
use Eloquent\Phony\Call\CallVerifierFactory;
use Eloquent\Phony\Hook\FunctionHookManager;
use Eloquent\Phony\Matcher\MatcherFactory;
use Eloquent\Phony\Matcher\... | php | MIT | 3d093d78e83fa5066559854505f01b6ea19af12e | 2026-01-05T02:35:49.024953Z | false |
eloquent/phony | https://github.com/eloquent/phony/blob/3d093d78e83fa5066559854505f01b6ea19af12e/src/Spy/Spy.php | src/Spy/Spy.php | <?php
declare(strict_types=1);
namespace Eloquent\Phony\Spy;
use Eloquent\Phony\Call\Call;
use Eloquent\Phony\Event\EventCollection;
use Eloquent\Phony\Invocation\WrappedInvocable;
/**
* The interface implemented by spies.
*/
interface Spy extends WrappedInvocable, EventCollection
{
/**
* Turn on or off ... | php | MIT | 3d093d78e83fa5066559854505f01b6ea19af12e | 2026-01-05T02:35:49.024953Z | false |
eloquent/phony | https://github.com/eloquent/phony/blob/3d093d78e83fa5066559854505f01b6ea19af12e/src/Spy/Exception/NonArrayAccessTraversableException.php | src/Spy/Exception/NonArrayAccessTraversableException.php | <?php
declare(strict_types=1);
namespace Eloquent\Phony\Spy\Exception;
use Exception;
use Traversable;
/**
* The wrapped traversable object does not implement ArrayAccess.
*/
final class NonArrayAccessTraversableException extends Exception
{
/**
* Construct a non-array-access traversable exception.
... | php | MIT | 3d093d78e83fa5066559854505f01b6ea19af12e | 2026-01-05T02:35:49.024953Z | false |
eloquent/phony | https://github.com/eloquent/phony/blob/3d093d78e83fa5066559854505f01b6ea19af12e/src/Spy/Exception/NonCountableTraversableException.php | src/Spy/Exception/NonCountableTraversableException.php | <?php
declare(strict_types=1);
namespace Eloquent\Phony\Spy\Exception;
use Exception;
use Traversable;
/**
* The wrapped traversable object does not implement Countable.
*/
final class NonCountableTraversableException extends Exception
{
/**
* Construct a non-countable traversable exception.
*
... | php | MIT | 3d093d78e83fa5066559854505f01b6ea19af12e | 2026-01-05T02:35:49.024953Z | false |
eloquent/phony | https://github.com/eloquent/phony/blob/3d093d78e83fa5066559854505f01b6ea19af12e/src/Matcher/MatcherResult.php | src/Matcher/MatcherResult.php | <?php
declare(strict_types=1);
namespace Eloquent\Phony\Matcher;
/**
* Represents the result of matching arguments against matchers.
*/
class MatcherResult
{
/**
* Construct a new matcher result.
*
* @param bool $isMatch True if successful match.
* @param array<int,bool> ... | php | MIT | 3d093d78e83fa5066559854505f01b6ea19af12e | 2026-01-05T02:35:49.024953Z | false |
eloquent/phony | https://github.com/eloquent/phony/blob/3d093d78e83fa5066559854505f01b6ea19af12e/src/Matcher/Matcher.php | src/Matcher/Matcher.php | <?php
declare(strict_types=1);
namespace Eloquent\Phony\Matcher;
use Eloquent\Phony\Exporter\Exporter;
/**
* The interface implemented by matchers.
*/
interface Matcher
{
/**
* Returns `true` if `$value` matches this matcher's criteria.
*
* @param mixed $value The value to check.
*
* ... | php | MIT | 3d093d78e83fa5066559854505f01b6ea19af12e | 2026-01-05T02:35:49.024953Z | false |
eloquent/phony | https://github.com/eloquent/phony/blob/3d093d78e83fa5066559854505f01b6ea19af12e/src/Matcher/AnyMatcher.php | src/Matcher/AnyMatcher.php | <?php
declare(strict_types=1);
namespace Eloquent\Phony\Matcher;
use Eloquent\Phony\Exporter\Exporter;
/**
* A matcher that always returns true.
*/
class AnyMatcher implements Matcher
{
/**
* Returns `true` if `$value` matches this matcher's criteria.
*
* @param mixed $value The value to check.... | php | MIT | 3d093d78e83fa5066559854505f01b6ea19af12e | 2026-01-05T02:35:49.024953Z | false |
eloquent/phony | https://github.com/eloquent/phony/blob/3d093d78e83fa5066559854505f01b6ea19af12e/src/Matcher/EqualToMatcher.php | src/Matcher/EqualToMatcher.php | <?php
declare(strict_types=1);
namespace Eloquent\Phony\Matcher;
use Eloquent\Phony\Exporter\Exporter;
use Eloquent\Phony\Mock\Handle\InstanceHandle;
use Eloquent\Phony\Mock\Mock;
use Eloquent\Phony\Spy\IterableSpy;
use Throwable;
/**
* A matcher that tests if the value is strictly equal to (===) another
* value.... | php | MIT | 3d093d78e83fa5066559854505f01b6ea19af12e | 2026-01-05T02:35:49.024953Z | false |
eloquent/phony | https://github.com/eloquent/phony/blob/3d093d78e83fa5066559854505f01b6ea19af12e/src/Matcher/WildcardMatcher.php | src/Matcher/WildcardMatcher.php | <?php
declare(strict_types=1);
namespace Eloquent\Phony\Matcher;
use Eloquent\Phony\Exporter\Exporter;
/**
* A matcher that tests any number of arguments against another matcher.
*/
class WildcardMatcher implements Matcher
{
/**
* Construct a new wildcard matcher.
*
* Negative values for $maxim... | php | MIT | 3d093d78e83fa5066559854505f01b6ea19af12e | 2026-01-05T02:35:49.024953Z | false |
eloquent/phony | https://github.com/eloquent/phony/blob/3d093d78e83fa5066559854505f01b6ea19af12e/src/Matcher/InstanceOfMatcher.php | src/Matcher/InstanceOfMatcher.php | <?php
declare(strict_types=1);
namespace Eloquent\Phony\Matcher;
use Eloquent\Phony\Exporter\Exporter;
use Eloquent\Phony\Matcher\Exception\UndefinedTypeException;
/**
* A matcher that tests if the value is an instance of a given interface or
* class.
*/
class InstanceOfMatcher implements Matcher
{
/**
... | php | MIT | 3d093d78e83fa5066559854505f01b6ea19af12e | 2026-01-05T02:35:49.024953Z | false |
eloquent/phony | https://github.com/eloquent/phony/blob/3d093d78e83fa5066559854505f01b6ea19af12e/src/Matcher/MatcherFactory.php | src/Matcher/MatcherFactory.php | <?php
declare(strict_types=1);
namespace Eloquent\Phony\Matcher;
use Eloquent\Phony\Exporter\Exporter;
/**
* Creates matchers.
*/
class MatcherFactory
{
/**
* Construct a new matcher factory.
*
* @param Matcher $anyMatcher A matcher that matches any value.
* @param Wildcard... | php | MIT | 3d093d78e83fa5066559854505f01b6ea19af12e | 2026-01-05T02:35:49.024953Z | false |
eloquent/phony | https://github.com/eloquent/phony/blob/3d093d78e83fa5066559854505f01b6ea19af12e/src/Matcher/MatcherDriver.php | src/Matcher/MatcherDriver.php | <?php
declare(strict_types=1);
namespace Eloquent\Phony\Matcher;
/**
* The interface implemented by matcher drivers.
*/
interface MatcherDriver
{
/**
* Returns true if this matcher driver's classes or interfaces exist.
*
* @return bool True if available.
*/
public function isAvailable()... | php | MIT | 3d093d78e83fa5066559854505f01b6ea19af12e | 2026-01-05T02:35:49.024953Z | false |
eloquent/phony | https://github.com/eloquent/phony/blob/3d093d78e83fa5066559854505f01b6ea19af12e/src/Matcher/MatcherVerifier.php | src/Matcher/MatcherVerifier.php | <?php
declare(strict_types=1);
namespace Eloquent\Phony\Matcher;
/**
* Verifies argument lists against matcher lists.
*/
class MatcherVerifier
{
/**
* Verify that the supplied arguments match the supplied matchers.
*
* @param array<int,Matcher> $matchers The matchers.
* @param array<int,mi... | php | MIT | 3d093d78e83fa5066559854505f01b6ea19af12e | 2026-01-05T02:35:49.024953Z | false |
eloquent/phony | https://github.com/eloquent/phony/blob/3d093d78e83fa5066559854505f01b6ea19af12e/src/Matcher/Exception/UndefinedTypeException.php | src/Matcher/Exception/UndefinedTypeException.php | <?php
declare(strict_types=1);
namespace Eloquent\Phony\Matcher\Exception;
use Exception;
/**
* Thrown when the type specified in a matcher is not defined.
*/
final class UndefinedTypeException extends Exception
{
/**
* Construct a new undefined type exception.
*
* @param string $type The type.... | php | MIT | 3d093d78e83fa5066559854505f01b6ea19af12e | 2026-01-05T02:35:49.024953Z | false |
eloquent/phony | https://github.com/eloquent/phony/blob/3d093d78e83fa5066559854505f01b6ea19af12e/src/Verification/GeneratorVerifierFactory.php | src/Verification/GeneratorVerifierFactory.php | <?php
declare(strict_types=1);
namespace Eloquent\Phony\Verification;
use Eloquent\Phony\Assertion\AssertionRecorder;
use Eloquent\Phony\Assertion\AssertionRenderer;
use Eloquent\Phony\Call\Call;
use Eloquent\Phony\Call\CallVerifierFactory;
use Eloquent\Phony\Matcher\MatcherFactory;
use Eloquent\Phony\Spy\Spy;
/**
... | php | MIT | 3d093d78e83fa5066559854505f01b6ea19af12e | 2026-01-05T02:35:49.024953Z | false |
eloquent/phony | https://github.com/eloquent/phony/blob/3d093d78e83fa5066559854505f01b6ea19af12e/src/Verification/CardinalityVerifierTrait.php | src/Verification/CardinalityVerifierTrait.php | <?php
declare(strict_types=1);
namespace Eloquent\Phony\Verification;
use Eloquent\Phony\Verification\Exception\InvalidCardinalityException;
/**
* Used for implementing cardinality verifiers.
*/
trait CardinalityVerifierTrait
{
/**
* Requires that the next verification never matches.
*
* @retur... | php | MIT | 3d093d78e83fa5066559854505f01b6ea19af12e | 2026-01-05T02:35:49.024953Z | false |
eloquent/phony | https://github.com/eloquent/phony/blob/3d093d78e83fa5066559854505f01b6ea19af12e/src/Verification/Cardinality.php | src/Verification/Cardinality.php | <?php
declare(strict_types=1);
namespace Eloquent\Phony\Verification;
use Eloquent\Phony\Verification\Exception\InvalidCardinalityException;
use Eloquent\Phony\Verification\Exception\InvalidCardinalityStateException;
use Eloquent\Phony\Verification\Exception\InvalidSingularCardinalityException;
/**
* Represents th... | php | MIT | 3d093d78e83fa5066559854505f01b6ea19af12e | 2026-01-05T02:35:49.024953Z | false |
eloquent/phony | https://github.com/eloquent/phony/blob/3d093d78e83fa5066559854505f01b6ea19af12e/src/Verification/IterableVerifier.php | src/Verification/IterableVerifier.php | <?php
declare(strict_types=1);
namespace Eloquent\Phony\Verification;
use ArrayIterator;
use Eloquent\Phony\Assertion\AssertionRecorder;
use Eloquent\Phony\Assertion\AssertionRenderer;
use Eloquent\Phony\Call\Call;
use Eloquent\Phony\Call\CallVerifierFactory;
use Eloquent\Phony\Call\Event\ProducedEvent;
use Eloquent... | php | MIT | 3d093d78e83fa5066559854505f01b6ea19af12e | 2026-01-05T02:35:49.024953Z | false |
eloquent/phony | https://github.com/eloquent/phony/blob/3d093d78e83fa5066559854505f01b6ea19af12e/src/Verification/IterableVerifierFactory.php | src/Verification/IterableVerifierFactory.php | <?php
declare(strict_types=1);
namespace Eloquent\Phony\Verification;
use Eloquent\Phony\Assertion\AssertionRecorder;
use Eloquent\Phony\Assertion\AssertionRenderer;
use Eloquent\Phony\Call\Call;
use Eloquent\Phony\Call\CallVerifierFactory;
use Eloquent\Phony\Matcher\MatcherFactory;
use Eloquent\Phony\Spy\Spy;
/**
... | php | MIT | 3d093d78e83fa5066559854505f01b6ea19af12e | 2026-01-05T02:35:49.024953Z | false |
eloquent/phony | https://github.com/eloquent/phony/blob/3d093d78e83fa5066559854505f01b6ea19af12e/src/Verification/GeneratorVerifier.php | src/Verification/GeneratorVerifier.php | <?php
declare(strict_types=1);
namespace Eloquent\Phony\Verification;
use Eloquent\Phony\Assertion\AssertionRecorder;
use Eloquent\Phony\Assertion\AssertionRenderer;
use Eloquent\Phony\Call\Call;
use Eloquent\Phony\Call\CallVerifierFactory;
use Eloquent\Phony\Call\Event\ReceivedEvent;
use Eloquent\Phony\Call\Event\R... | php | MIT | 3d093d78e83fa5066559854505f01b6ea19af12e | 2026-01-05T02:35:49.024953Z | false |
eloquent/phony | https://github.com/eloquent/phony/blob/3d093d78e83fa5066559854505f01b6ea19af12e/src/Verification/CardinalityVerifier.php | src/Verification/CardinalityVerifier.php | <?php
declare(strict_types=1);
namespace Eloquent\Phony\Verification;
use Eloquent\Phony\Verification\Exception\InvalidCardinalityException;
/**
* The interface implemented by cardinality verifiers.
*/
interface CardinalityVerifier
{
/**
* Requires that the next verification never matches.
*
* ... | php | MIT | 3d093d78e83fa5066559854505f01b6ea19af12e | 2026-01-05T02:35:49.024953Z | false |
eloquent/phony | https://github.com/eloquent/phony/blob/3d093d78e83fa5066559854505f01b6ea19af12e/src/Verification/Exception/InvalidCardinalityStateException.php | src/Verification/Exception/InvalidCardinalityStateException.php | <?php
declare(strict_types=1);
namespace Eloquent\Phony\Verification\Exception;
use Exception;
/**
* The requested operation would create an invalid cardinality state.
*/
final class InvalidCardinalityStateException extends Exception implements
InvalidCardinalityException
{
/**
* Construct a new inva... | php | MIT | 3d093d78e83fa5066559854505f01b6ea19af12e | 2026-01-05T02:35:49.024953Z | false |
eloquent/phony | https://github.com/eloquent/phony/blob/3d093d78e83fa5066559854505f01b6ea19af12e/src/Verification/Exception/InvalidSingularCardinalityException.php | src/Verification/Exception/InvalidSingularCardinalityException.php | <?php
declare(strict_types=1);
namespace Eloquent\Phony\Verification\Exception;
use Eloquent\Phony\Verification\Cardinality;
use Exception;
/**
* The specified cardinality is invalid for events that can only happen once or
* not at all.
*/
final class InvalidSingularCardinalityException extends Exception impleme... | php | MIT | 3d093d78e83fa5066559854505f01b6ea19af12e | 2026-01-05T02:35:49.024953Z | false |
eloquent/phony | https://github.com/eloquent/phony/blob/3d093d78e83fa5066559854505f01b6ea19af12e/src/Verification/Exception/InvalidCardinalityException.php | src/Verification/Exception/InvalidCardinalityException.php | <?php
declare(strict_types=1);
namespace Eloquent\Phony\Verification\Exception;
/**
* The interface used to identify invalid cardinality exceptions.
*/
interface InvalidCardinalityException
{
}
| php | MIT | 3d093d78e83fa5066559854505f01b6ea19af12e | 2026-01-05T02:35:49.024953Z | false |
eloquent/phony | https://github.com/eloquent/phony/blob/3d093d78e83fa5066559854505f01b6ea19af12e/src/Stub/StubFactory.php | src/Stub/StubFactory.php | <?php
declare(strict_types=1);
namespace Eloquent\Phony\Stub;
use Eloquent\Phony\Assertion\AssertionRenderer;
use Eloquent\Phony\Exporter\Exporter;
use Eloquent\Phony\Invocation\InvocableInspector;
use Eloquent\Phony\Invocation\Invoker;
use Eloquent\Phony\Matcher\MatcherFactory;
use Eloquent\Phony\Matcher\MatcherVer... | php | MIT | 3d093d78e83fa5066559854505f01b6ea19af12e | 2026-01-05T02:35:49.024953Z | false |
eloquent/phony | https://github.com/eloquent/phony/blob/3d093d78e83fa5066559854505f01b6ea19af12e/src/Stub/StubData.php | src/Stub/StubData.php | <?php
declare(strict_types=1);
namespace Eloquent\Phony\Stub;
use Eloquent\Phony\Assertion\AssertionRenderer;
use Eloquent\Phony\Call\Arguments;
use Eloquent\Phony\Exporter\Exporter;
use Eloquent\Phony\Invocation\InvocableInspector;
use Eloquent\Phony\Invocation\Invoker;
use Eloquent\Phony\Invocation\WrappedInvocabl... | php | MIT | 3d093d78e83fa5066559854505f01b6ea19af12e | 2026-01-05T02:35:49.024953Z | false |
eloquent/phony | https://github.com/eloquent/phony/blob/3d093d78e83fa5066559854505f01b6ea19af12e/src/Stub/StubRule.php | src/Stub/StubRule.php | <?php
declare(strict_types=1);
namespace Eloquent\Phony\Stub;
use Eloquent\Phony\Matcher\Matcher;
use Eloquent\Phony\Stub\Answer\Answer;
use Eloquent\Phony\Stub\Exception\UndefinedAnswerException;
/**
* Represents a set of criteria and associated answers.
*/
class StubRule
{
/**
* Construct a new stub ru... | php | MIT | 3d093d78e83fa5066559854505f01b6ea19af12e | 2026-01-05T02:35:49.024953Z | false |
eloquent/phony | https://github.com/eloquent/phony/blob/3d093d78e83fa5066559854505f01b6ea19af12e/src/Stub/StubVerifierFactory.php | src/Stub/StubVerifierFactory.php | <?php
declare(strict_types=1);
namespace Eloquent\Phony\Stub;
use Eloquent\Phony\Assertion\AssertionRecorder;
use Eloquent\Phony\Assertion\AssertionRenderer;
use Eloquent\Phony\Call\CallVerifierFactory;
use Eloquent\Phony\Hook\FunctionHookManager;
use Eloquent\Phony\Matcher\MatcherFactory;
use Eloquent\Phony\Matcher... | php | MIT | 3d093d78e83fa5066559854505f01b6ea19af12e | 2026-01-05T02:35:49.024953Z | false |
eloquent/phony | https://github.com/eloquent/phony/blob/3d093d78e83fa5066559854505f01b6ea19af12e/src/Stub/StubVerifier.php | src/Stub/StubVerifier.php | <?php
declare(strict_types=1);
namespace Eloquent\Phony\Stub;
use Eloquent\Phony\Assertion\AssertionRecorder;
use Eloquent\Phony\Assertion\AssertionRenderer;
use Eloquent\Phony\Call\Arguments;
use Eloquent\Phony\Call\CallVerifierFactory;
use Eloquent\Phony\Invocation\WrappedInvocable;
use Eloquent\Phony\Matcher\Matc... | php | MIT | 3d093d78e83fa5066559854505f01b6ea19af12e | 2026-01-05T02:35:49.024953Z | false |
eloquent/phony | https://github.com/eloquent/phony/blob/3d093d78e83fa5066559854505f01b6ea19af12e/src/Stub/Stub.php | src/Stub/Stub.php | <?php
declare(strict_types=1);
namespace Eloquent\Phony\Stub;
use Eloquent\Phony\Call\Arguments;
use Eloquent\Phony\Invocation\WrappedInvocable;
use Eloquent\Phony\Stub\Answer\Builder\GeneratorAnswerBuilder;
use Throwable;
/**
* The interface implemented by stubs.
*/
interface Stub extends WrappedInvocable
{
... | php | MIT | 3d093d78e83fa5066559854505f01b6ea19af12e | 2026-01-05T02:35:49.024953Z | false |
eloquent/phony | https://github.com/eloquent/phony/blob/3d093d78e83fa5066559854505f01b6ea19af12e/src/Stub/EmptyValueFactory.php | src/Stub/EmptyValueFactory.php | <?php
declare(strict_types=1);
namespace Eloquent\Phony\Stub;
use Eloquent\Phony\Mock\Builder\MockBuilderFactory;
use Eloquent\Phony\Reflection\FeatureDetector;
use ReflectionFunctionAbstract;
use ReflectionIntersectionType;
use ReflectionMethod;
use ReflectionNamedType;
use ReflectionType;
use ReflectionUnionType;
... | php | MIT | 3d093d78e83fa5066559854505f01b6ea19af12e | 2026-01-05T02:35:49.024953Z | false |
eloquent/phony | https://github.com/eloquent/phony/blob/3d093d78e83fa5066559854505f01b6ea19af12e/src/Stub/Answer/Answer.php | src/Stub/Answer/Answer.php | <?php
declare(strict_types=1);
namespace Eloquent\Phony\Stub\Answer;
/**
* Represents a stub answer.
*/
class Answer
{
/**
* Construct a new answer.
*
* @param CallRequest $primaryRequest The primary request.
* @param array<int,CallRequest> $secondaryRequests The secondary req... | php | MIT | 3d093d78e83fa5066559854505f01b6ea19af12e | 2026-01-05T02:35:49.024953Z | false |
eloquent/phony | https://github.com/eloquent/phony/blob/3d093d78e83fa5066559854505f01b6ea19af12e/src/Stub/Answer/CallRequest.php | src/Stub/Answer/CallRequest.php | <?php
declare(strict_types=1);
namespace Eloquent\Phony\Stub\Answer;
use Eloquent\Phony\Call\Arguments;
use Eloquent\Phony\Mock\Handle\InstanceHandle;
/**
* Represents a call request.
*/
class CallRequest
{
/**
* Construct a call request.
*
* @param callable $callback The callback... | php | MIT | 3d093d78e83fa5066559854505f01b6ea19af12e | 2026-01-05T02:35:49.024953Z | false |
eloquent/phony | https://github.com/eloquent/phony/blob/3d093d78e83fa5066559854505f01b6ea19af12e/src/Stub/Answer/Builder/GeneratorYieldIteration.php | src/Stub/Answer/Builder/GeneratorYieldIteration.php | <?php
declare(strict_types=1);
namespace Eloquent\Phony\Stub\Answer\Builder;
use Eloquent\Phony\Stub\Answer\CallRequest;
/**
* Represents an iteration of a generator that ends in a yield.
*/
class GeneratorYieldIteration
{
/**
* Construct a new generator yield iteration.
*
* @param array<int,Ca... | php | MIT | 3d093d78e83fa5066559854505f01b6ea19af12e | 2026-01-05T02:35:49.024953Z | false |
eloquent/phony | https://github.com/eloquent/phony/blob/3d093d78e83fa5066559854505f01b6ea19af12e/src/Stub/Answer/Builder/GeneratorYieldFromIteration.php | src/Stub/Answer/Builder/GeneratorYieldFromIteration.php | <?php
declare(strict_types=1);
namespace Eloquent\Phony\Stub\Answer\Builder;
use Eloquent\Phony\Stub\Answer\CallRequest;
/**
* Represents an iteration of a generator that ends in a yield from.
*/
class GeneratorYieldFromIteration
{
/**
* Construct a new generator yield from iteration.
*
* @para... | php | MIT | 3d093d78e83fa5066559854505f01b6ea19af12e | 2026-01-05T02:35:49.024953Z | false |
eloquent/phony | https://github.com/eloquent/phony/blob/3d093d78e83fa5066559854505f01b6ea19af12e/src/Stub/Answer/Builder/GeneratorAnswerBuilderFactory.php | src/Stub/Answer/Builder/GeneratorAnswerBuilderFactory.php | <?php
declare(strict_types=1);
namespace Eloquent\Phony\Stub\Answer\Builder;
use Eloquent\Phony\Invocation\InvocableInspector;
use Eloquent\Phony\Invocation\Invoker;
use Eloquent\Phony\Stub\Stub;
/**
* Creates generator answer builders.
*/
class GeneratorAnswerBuilderFactory
{
/**
* Construct a new gener... | php | MIT | 3d093d78e83fa5066559854505f01b6ea19af12e | 2026-01-05T02:35:49.024953Z | false |
eloquent/phony | https://github.com/eloquent/phony/blob/3d093d78e83fa5066559854505f01b6ea19af12e/src/Stub/Answer/Builder/GeneratorAnswerBuilder.php | src/Stub/Answer/Builder/GeneratorAnswerBuilder.php | <?php
declare(strict_types=1);
namespace Eloquent\Phony\Stub\Answer\Builder;
use Eloquent\Phony\Call\Arguments;
use Eloquent\Phony\Invocation\InvocableInspector;
use Eloquent\Phony\Invocation\Invoker;
use Eloquent\Phony\Mock\Handle\InstanceHandle;
use Eloquent\Phony\Stub\Answer\CallRequest;
use Eloquent\Phony\Stub\S... | php | MIT | 3d093d78e83fa5066559854505f01b6ea19af12e | 2026-01-05T02:35:49.024953Z | false |
eloquent/phony | https://github.com/eloquent/phony/blob/3d093d78e83fa5066559854505f01b6ea19af12e/src/Stub/Exception/UndefinedAnswerException.php | src/Stub/Exception/UndefinedAnswerException.php | <?php
declare(strict_types=1);
namespace Eloquent\Phony\Stub\Exception;
use Exception;
/**
* No answer was defined, or the answer is incomplete.
*/
final class UndefinedAnswerException extends Exception
{
/**
* Construct a new undefined answer exception.
*/
public function __construct()
{
... | php | MIT | 3d093d78e83fa5066559854505f01b6ea19af12e | 2026-01-05T02:35:49.024953Z | false |
eloquent/phony | https://github.com/eloquent/phony/blob/3d093d78e83fa5066559854505f01b6ea19af12e/src/Stub/Exception/UnusedStubCriteriaException.php | src/Stub/Exception/UnusedStubCriteriaException.php | <?php
declare(strict_types=1);
namespace Eloquent\Phony\Stub\Exception;
use Eloquent\Phony\Assertion\AssertionRenderer;
use Eloquent\Phony\Matcher\Matcher;
use Exception;
/**
* Stub criteria were specified, but never used.
*/
final class UnusedStubCriteriaException extends Exception
{
/**
* Construct a n... | php | MIT | 3d093d78e83fa5066559854505f01b6ea19af12e | 2026-01-05T02:35:49.024953Z | false |
eloquent/phony | https://github.com/eloquent/phony/blob/3d093d78e83fa5066559854505f01b6ea19af12e/src/Stub/Exception/FinalReturnTypeException.php | src/Stub/Exception/FinalReturnTypeException.php | <?php
declare(strict_types=1);
namespace Eloquent\Phony\Stub\Exception;
use Exception;
use Throwable;
/**
* Unable to generate a default value for a function with a final return type.
*/
final class FinalReturnTypeException extends Exception
{
/**
* Construct a new final return type exception.
*
... | php | MIT | 3d093d78e83fa5066559854505f01b6ea19af12e | 2026-01-05T02:35:49.024953Z | false |
eloquent/phony | https://github.com/eloquent/phony/blob/3d093d78e83fa5066559854505f01b6ea19af12e/test/fixture/verification/consumed/times/verification.php | test/fixture/verification/consumed/times/verification.php | <?php
use Eloquent\Phony\Test\Facade\Phony;
// setup
$stub = Phony::stub()->setLabel('label')->setUseIterableSpies(true);
$stub->with('aardvark')->returns(['AARDVARK']);
$stub->with('bonobo')->returns(['BONOBO']);
iterator_to_array($stub('aardvark'));
iterator_to_array($stub('bonobo'));
// verification
$stub->iterat... | php | MIT | 3d093d78e83fa5066559854505f01b6ea19af12e | 2026-01-05T02:35:49.024953Z | false |
eloquent/phony | https://github.com/eloquent/phony/blob/3d093d78e83fa5066559854505f01b6ea19af12e/test/fixture/verification/consumed/always/verification.php | test/fixture/verification/consumed/always/verification.php | <?php
use Eloquent\Phony\Test\Facade\Phony;
// setup
$stub = Phony::stub()->setLabel('label')->setUseIterableSpies(true);
$stub->with('aardvark')->returns(['AARDVARK']);
$stub->with('bonobo')->returns(['BONOBO']);
iterator_to_array($stub('aardvark'));
$stub('bonobo');
// verification
$stub->iterated()->always()->con... | php | MIT | 3d093d78e83fa5066559854505f01b6ea19af12e | 2026-01-05T02:35:49.024953Z | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.