public static function replicate($data)
    {
        $copy = clone $data;

        foreach ($copy as $key => $value) {
            if (is_object($value)) {
                $copy->{$key} = static::replicate($value);
            }
        }

        return $copy;
    }