src/Library/Helper/Code.php
public static function isClassInstance($object, $class_name)
    {
        if (class_exists($class_name) && is_object($object)) {
            return (bool) ($object instanceof $class_name);
        }
        return false;
    }
public static function isClassInstance($object, $class_name)
    {
        if (class_exists($class_name) && is_object($object)) {
            return (bool) ($object instanceof $class_name);
        }
        return false;
    }
public static function isClassInstance ( $ object , $ class_name ) { if ( class_exists ( $ class_name ) && is_object ( $ object ) ) { return ( bool ) ( $ object instanceof $ class_name ) ; } return false ; }
Check if a an object is an instance of a class

@param object $object
@param string $class_name

@return bool
Check if a an object is an instance of a class