public static function isVendorClass($classNameOrObject)
    {
        $className = (is_object($classNameOrObject)) ?  get_class($classNameOrObject) : $classNameOrObject;
        if (!class_exists($className)) {
            $message = '"' . $className . '" is not the name of a loadable class.';
            throw new \InvalidArgumentException($message);
        }
        $reflection = new \ReflectionClass($className);
        if ($reflection->isInternal()) {
            return false;
        }
        return static::isVendorFile($reflection->getFileName());
    }