Code Duplication    Length = 13-13 lines in 4 locations

src/AppBundle/Controller/BandController.php 2 locations

@@ 103-115 (lines=13) @@
100
     *     }
101
     * )
102
     */
103
    public function createAction(Request $request): Response
104
    {
105
        $form = $this->createAndProcessForm($request, BandFormType::class);
106
107
        $apiResponseFactory = $this->get('rockparade.api_response_factory');
108
        $response = $apiResponseFactory->createResponse(
109
            $this->createApiOperation($request),
110
            $form,
111
            $this->getUser()
112
        );
113
114
        return $this->respond($response);
115
    }
116
117
    /**
118
     * Edit band
@@ 233-245 (lines=13) @@
230
     *     }
231
     * )
232
     */
233
    public function createMemberAction(Request $request): Response
234
    {
235
        $form = $this->createAndProcessForm($request, BandMemberFormType::class);
236
237
        $apiResponseFactory = $this->get('rockparade.api_response_factory');
238
        $response = $apiResponseFactory->createResponse(
239
            $this->createApiOperation($request),
240
            $form,
241
            $this->getUser()
242
        );
243
244
        return $this->respond($response);
245
    }
246
247
    /**
248
     * Delete member from band

src/AppBundle/Controller/OrganizerController.php 2 locations

@@ 114-126 (lines=13) @@
111
     *     }
112
     * )
113
     */
114
    public function createAction(Request $request): Response
115
    {
116
        $form = $this->createAndProcessForm($request, OrganizerFormType::class);
117
118
        $apiResponseFactory = $this->get('rockparade.api_response_factory');
119
        $response = $apiResponseFactory->createResponse(
120
            $this->createApiOperation($request),
121
            $form,
122
            $this->getUser()
123
        );
124
125
        return $this->respond($response);
126
    }
127
128
    /**
129
     * Add new member to organization
@@ 168-180 (lines=13) @@
165
     *     }
166
     * )
167
     */
168
    public function createMemberAction(Request $request): Response
169
    {
170
        $form = $this->createAndProcessForm($request, OrganizerMemberFormType::class);
171
172
        $apiResponseFactory = $this->get('rockparade.api_response_factory');
173
        $response = $apiResponseFactory->createResponse(
174
            $this->createApiOperation($request),
175
            $form,
176
            $this->getUser()
177
        );
178
179
        return $this->respond($response);
180
    }
181
}
182