public function isInstance($object) : bool
    {
        if (! is_object($object)) {
            throw NotAnObject::fromNonObject($object);
        }

        $className = $this->getName();

        // note: since $object was loaded, we can safely assume that $className is available in the current
        //       php script execution context
        return $object instanceof $className;
    }
public function isInstance($object) : bool
    {
        if (! is_object($object)) {
            throw NotAnObject::fromNonObject($object);
        }

        $className = $this->getName();

        // note: since $object was loaded, we can safely assume that $className is available in the current
        //       php script execution context
        return $object instanceof $className;
    }
public function isInstance ( $ object ) : bool { if ( ! is_object ( $ object ) ) { throw NotAnObject :: fromNonObject ( $ object ) ; } $ className = $ this -> getName ( ) ; // note: since $object was loaded, we can safely assume that $className is available in the current //       php script execution context return $ object instanceof $ className ; }
Checks whether the given object is an instance.

@link https://php.net/manual/en/reflectionclass.isinstance.php

@param object $object

@throws NotAnObject

@psalm-suppress DocblockTypeContradiction
Checks whether the given object is an instance .