Code Duplication    Length = 3-3 lines in 2 locations

src/AppBundle/Controller/CalendarController.php 2 locations

@@ 49-51 (lines=3) @@
46
    {
47
        $data = json_decode($request->getContent(), true);
48
49
        if (!$data['event']['start'] || !$data['event']['end'] || !$data['event']['user']) {
50
            throw new JsonHttpException(400, 'Bad request.');
51
        }
52
53
        $dtoEvent = new DtoEvent();
54
        $form = $this->createForm(EventType::class, $dtoEvent);
@@ 168-170 (lines=3) @@
165
    {
166
        $data = json_decode($request->getContent(), true);
167
168
        if (!$data['event']['start'] || !$data['event']['end'] || !$data['event']['user']) {
169
            throw new JsonHttpException(400, 'Bad request.');
170
        }
171
172
        $dtoEvent = new DtoEvent();
173
        $form = $this->createForm(EventType::class, $dtoEvent);