private function setDataOnEntity(FormatOptions $formatOptions, array $data)
    {
        if (!isset($data['cropX']) || !isset($data['cropY']) || !isset($data['cropWidth']) || !isset($data['cropHeight'])) {
            throw new FormatOptionsMissingParameterException();
        }

        $formatOptions->setCropX($data['cropX']);
        $formatOptions->setCropY($data['cropY']);
        $formatOptions->setCropWidth($data['cropWidth']);
        $formatOptions->setCropHeight($data['cropHeight']);

        return $formatOptions;
    }