final public function whereInstanceOf(string $class)
    {
        if ($this->class === $class) {
            return $this;
        }

        if (!is_a($class, $this->class->getClassName(), true)) {
            throw InvalidArgumentException::format(
                'Invalid class supplied to %s: must be an a subclass of %s, %s given',
                __METHOD__, $this->class->getClassName(), $class
            );
        }

        $this->append(new InstanceOfCondition($class));
        
        if (!$this->isOrMode) {
            $this->class = $class::definition();
        }

        return $this;
    }
final public function whereInstanceOf(string $class)
    {
        if ($this->class === $class) {
            return $this;
        }

        if (!is_a($class, $this->class->getClassName(), true)) {
            throw InvalidArgumentException::format(
                'Invalid class supplied to %s: must be an a subclass of %s, %s given',
                __METHOD__, $this->class->getClassName(), $class
            );
        }

        $this->append(new InstanceOfCondition($class));
        
        if (!$this->isOrMode) {
            $this->class = $class::definition();
        }

        return $this;
    }
final public function whereInstanceOf ( string $ class ) { if ( $ this -> class === $ class ) { return $ this ; } if ( ! is_a ( $ class , $ this -> class -> getClassName ( ) , true ) ) { throw InvalidArgumentException :: format ( 'Invalid class supplied to %s: must be an a subclass of %s, %s given' , __METHOD__ , $ this -> class -> getClassName ( ) , $ class ) ; } $ this -> append ( new InstanceOfCondition ( $ class ) ) ; if ( ! $ this -> isOrMode ) { $ this -> class = $ class :: definition ( ) ; } return $ this ; }
Defines a condition that is satisfied when the class
is an instance of the supplied class.

@param string $class

@return static
@throws InvalidArgumentException
Defines a condition that is satisfied when the class is an instance of the supplied class .