Eloquent\Phony\Verification\Cardinality::assertSingular PHP Method

assertSingular() public method

Asserts that this cardinality is suitable for events that can only happen once or not at all.
public assertSingular ( )
    public function assertSingular()
    {
        if ($this->minimum > 1 || $this->maximum > 1 || $this->isAlways) {
            throw new InvalidSingularCardinalityException($this);
        }
        return $this;
    }