src/Call/CallVerifier.php
public function calledWith(...$arguments): ?EventCollection
    {
        $cardinality = $this->cardinality;
        $matchers = $this->matcherFactory->adaptAll($arguments);

        if ($result = $this->checkCalledWith(...$matchers)) {
            return $result;
        }

        return $this->assertionRecorder->createFailure(
            $this->assertionRenderer
                ->renderCalledWith($this->call, $cardinality, $matchers)
        );
    }
public function calledWith(...$arguments): ?EventCollection
    {
        $cardinality = $this->cardinality;
        $matchers = $this->matcherFactory->adaptAll($arguments);

        if ($result = $this->checkCalledWith(...$matchers)) {
            return $result;
        }

        return $this->assertionRecorder->createFailure(
            $this->assertionRenderer
                ->renderCalledWith($this->call, $cardinality, $matchers)
        );
    }
public function calledWith ( ... $ arguments ) : ? EventCollection { $ cardinality = $ this -> cardinality ; $ matchers = $ this -> matcherFactory -> adaptAll ( $ arguments ) ; if ( $ result = $ this -> checkCalledWith ( ... $ matchers ) ) { return $ result ; } return $ this -> assertionRecorder -> createFailure ( $ this -> assertionRenderer -> renderCalledWith ( $ this -> call , $ cardinality , $ matchers ) ) ; }
Throws an exception unless called with the supplied arguments.

@param mixed ...$argument The arguments.

@return EventCollection|null        The result, or null if the assertion recorder does not throw exceptions.
@throws InvalidCardinalityException If the cardinality is invalid.
@throws Throwable                   If the assertion fails, and the assertion recorder throws exceptions.
Throws an exception unless called with the supplied arguments .