src/Verification/GeneratorVerifier.php
public function received($value = null): ?EventCollection
    {
        $cardinality = $this->cardinality;
        $argumentCount = func_num_args();

        if (0 === $argumentCount) {
            $arguments = [];
        } else {
            $value = $this->matcherFactory->adapt($value);
            $arguments = [$value];
        }

        if ($result = $this->checkReceived(...$arguments)) {
            return $result;
        }

        return $this->assertionRecorder->createFailure(
            $this->assertionRenderer
                ->renderGeneratorReceived($this->subject, $cardinality, $value)
        );
    }
public function received($value = null): ?EventCollection
    {
        $cardinality = $this->cardinality;
        $argumentCount = func_num_args();

        if (0 === $argumentCount) {
            $arguments = [];
        } else {
            $value = $this->matcherFactory->adapt($value);
            $arguments = [$value];
        }

        if ($result = $this->checkReceived(...$arguments)) {
            return $result;
        }

        return $this->assertionRecorder->createFailure(
            $this->assertionRenderer
                ->renderGeneratorReceived($this->subject, $cardinality, $value)
        );
    }
public function received ( $ value = null ) : ? EventCollection { $ cardinality = $ this -> cardinality ; $ argumentCount = func_num_args ( ) ; if ( 0 === $ argumentCount ) { $ arguments = [ ] ; } else { $ value = $ this -> matcherFactory -> adapt ( $ value ) ; $ arguments = [ $ value ] ; } if ( $ result = $ this -> checkReceived ( ... $ arguments ) ) { return $ result ; } return $ this -> assertionRecorder -> createFailure ( $ this -> assertionRenderer -> renderGeneratorReceived ( $ this -> subject , $ cardinality , $ value ) ) ; }
Throws an exception unless the subject received the supplied value.

When called with no arguments, this method simply checks that the subject
received any value.

@param mixed $value The value.

@return EventCollection|null The result, or null if the assertion recorder does not throw exceptions.
@throws Throwable            If the assertion fails, and the assertion recorder throws exceptions.
Throws an exception unless the subject received the supplied value .