src/Verification/IterableVerifier.php
public function used(): ?EventCollection
    {
        $cardinality = $this->cardinality;

        if ($result = $this->checkUsed()) {
            return $result;
        }

        return $this->assertionRecorder->createFailure(
            $this->assertionRenderer->renderIterableUsed(
                $this->subject,
                $cardinality,
                $this->isGenerator
            )
        );
    }
public function used(): ?EventCollection
    {
        $cardinality = $this->cardinality;

        if ($result = $this->checkUsed()) {
            return $result;
        }

        return $this->assertionRecorder->createFailure(
            $this->assertionRenderer->renderIterableUsed(
                $this->subject,
                $cardinality,
                $this->isGenerator
            )
        );
    }
public function used ( ) : ? EventCollection { $ cardinality = $ this -> cardinality ; if ( $ result = $ this -> checkUsed ( ) ) { return $ result ; } return $ this -> assertionRecorder -> createFailure ( $ this -> assertionRenderer -> renderIterableUsed ( $ this -> subject , $ cardinality , $ this -> isGenerator ) ) ; }
Throws an exception unless iteration of the subject commenced.

@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 iteration of the subject commenced .