Code Duplication    Length = 10-10 lines in 2 locations

src/Http/Controllers/AdminController.php 2 locations

@@ 179-188 (lines=10) @@
176
     * @return \Illuminate\Http\JsonResponse
177
     * @throws \Illuminate\Auth\Access\AuthorizationException
178
     */
179
    public function delete(ComponentInterface $component, $id)
180
    {
181
        if (! $component->isDelete()) {
182
            throw new AuthorizationException();
183
        }
184
185
        $component->delete($id);
186
187
        return response()->json(['message' => 'ok']);
188
    }
189
190
    /**
191
     * @param \Sco\Admin\Contracts\ComponentInterface $component
@@ 228-237 (lines=10) @@
225
     * @return \Illuminate\Http\JsonResponse
226
     * @throws \Illuminate\Auth\Access\AuthorizationException
227
     */
228
    public function reorder(ComponentInterface $component)
229
    {
230
        if (! $component->isEdit()) {
231
            throw new AuthorizationException();
232
        }
233
234
        //TODO
235
236
        return response()->json(['message' => 'ok']);
237
    }
238
}
239