public function class($subject, string $className) : bool
    {
        if (!$className) {
            throw new InvalidArgumentException('Arg className is empty.');
        }
        return $subject && is_object($subject) && is_a($subject, $className);
    }
public function class($subject, string $className) : bool
    {
        if (!$className) {
            throw new InvalidArgumentException('Arg className is empty.');
        }
        return $subject && is_object($subject) && is_a($subject, $className);
    }
public function class ( $ subject , string $ className ) : bool { if ( ! $ className ) { throw new InvalidArgumentException ( 'Arg className is empty.' ) ; } return $ subject && is_object ( $ subject ) && is_a ( $ subject , $ className ) ; }
Is object and is of that class or interface, or has it as ancestor.

@uses is_a()

@param mixed $subject
object to pass validation.
@param string $className

@return bool

@throws InvalidArgumentException
Arg className empty.
Is object and is of that class or interface or has it as ancestor .