Code Duplication    Length = 8-8 lines in 2 locations

src/Addon/AddonProvider.php 2 locations

@@ 305-312 (lines=8) @@
302
303
            if (is_string($route['uses']) && !str_contains($route['uses'], '@')) {
304
                $this->router->resource($uri, $route['uses']);
305
            } else {
306
307
                $route = $this->router->{$verb}($uri, $route)->where($constraints);
308
309
                if ($middleware) {
310
                    call_user_func_array([$route, 'middleware'], (array)$middleware);
311
                }
312
            }
313
        }
314
    }
315
@@ 362-369 (lines=8) @@
359
360
                    if (is_string($route['uses']) && !str_contains($route['uses'], '@')) {
361
                        $router->resource($uri, $route['uses']);
362
                    } else {
363
364
                        $route = $router->{$verb}($uri, $route)->where($constraints);
365
366
                        if ($middleware) {
367
                            call_user_func_array([$route, 'middleware'], (array)$middleware);
368
                        }
369
                    }
370
                }
371
            }
372
        );