Code Duplication    Length = 3-3 lines in 2 locations

src/AppBundle/Controller/CalendarController.php 2 locations

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