Code Duplication    Length = 10-10 lines in 2 locations

Translation/HistoryManager.php 1 location

@@ 63-72 (lines=10) @@
60
     *
61
     * @throws BadRequestHttpException
62
     */
63
    private function parseJsonContent(Request $request)
64
    {
65
        $content = json_decode($request->getContent(), true);
66
67
        if (empty($content)) {
68
            throw new BadRequestHttpException('No content found.');
69
        }
70
71
        return $content;
72
    }
73
}
74

Translation/TranslationManager.php 1 location

@@ 255-264 (lines=10) @@
252
     *
253
     * @throws BadRequestHttpException
254
     */
255
    private function parseJsonContent(Request $request)
256
    {
257
        $content = json_decode($request->getContent(), true);
258
259
        if (empty($content)) {
260
            throw new BadRequestHttpException('No content found.');
261
        }
262
263
        return $content;
264
    }
265
266
    /**
267
     * Commits document into elasticsearch client.