src/Util/ClassUtil.php
public static function getClassName($object): ?string {
        $validObject = ClassUtil::isValidObject($object);
        if (!$validObject) {
            return null;
        }
        return (new \ReflectionClass($object))->getName();
    }
public static function getClassName($object): ?string {
        $validObject = ClassUtil::isValidObject($object);
        if (!$validObject) {
            return null;
        }
        return (new \ReflectionClass($object))->getName();
    }
public static function getClassName ( $ object ) : ? string { $ validObject = ClassUtil :: isValidObject ( $ object ) ; if ( ! $ validObject ) { return null ; } return ( new \ ReflectionClass ( $ object ) ) -> getName ( ) ; }
returns the name of an object

@param $object
@return null|string
@throws \ReflectionException
returns the name of an object