protected function cleanFormData(array $data)
    {
        foreach ($data as $key => $value) {
            if (\is_array($value)) {
                $data[$key] = $this->cleanFormData($value);
            } elseif (\is_object($value)) {
                unset($data[$key]);
            }
        }

        return $data;
    }