protected function cleanup(array &$data)
    {
        foreach ($data as &$value) {
            if (\is_array($value)) {
                $this->cleanup($value);
            }
        }

        $data = array_filter($data, function ($value) {
            return null !== $value;
        });
    }