public static function objToSnakeArray($object, $blackList = [])
    {
        if (!is_object($object)) {
            throw new \InvalidArgumentException('Not an object');
        }

        return array_reduce(
            self::getAllProperties($object, $blackList),
            function (
                array $result,
                \ReflectionProperty $property
            ) use (
                $object
            ) {
                $property->setAccessible(true);

                $field = $property->getName();
                $value = $property->getValue($object);
                $value = self::transformValue($value);

                if ($object instanceof WithNullableFields) {
                    if (is_null($value) && !$object->isNullable($field)) {
                        return $result;
                    }

                    if ($object->isNullable($field) && !$object->isValueChanged($field)) {
                        return $result;
                    }
                } elseif (is_null($value)) {
                    return $result;
                }


                $result[Str::snake($field)] = $value;

                $property->setAccessible(false);

                return $result;
            },
            []
        );
    }