public static function get($object, $property)
    {
        $property = self::getReflectionProperty($object, $property);

        if (is_string($object) || $property->isStatic()) {
            if (($declaringClass = $property->getDeclaringClass()->getName()) !== self::toClassName($object)) {
                return self::getReflectionProperty($declaringClass, $property->getName())->getValue(null);
            }

            return $property->getValue(null);
        }

        return $property->getValue($object);
    }