FootersRoutes::map()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 13
Code Lines 8

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 5
CRAP Score 1.0876

Importance

Changes 1
Bugs 0 Features 0
Metric Value
dl 0
loc 13
ccs 5
cts 9
cp 0.5556
rs 9.4285
c 1
b 0
f 0
cc 1
eloc 8
nc 1
nop 0
crap 1.0876
1
<?php namespace Arcanesoft\Seo\Http\Routes\Front;
2
3
use Arcanedev\Support\Routing\RouteRegistrar;
4
use Arcanesoft\Seo\Models\Footer;
5
6
/**
7
 * Class     FootersRoutes
8
 *
9
 * @package  Arcanesoft\Seo\Http\Routes\Front
10
 * @author   ARCANEDEV <[email protected]>
11
 */
12
class FootersRoutes extends RouteRegistrar
13
{
14
    /* -----------------------------------------------------------------
15
     |  Main Methods
16
     | -----------------------------------------------------------------
17
     */
18
19
    /**
20
     * Define the routes for the application.
21
     */
22
    public function map()
23
    {
24 16
        $this->bind('seo_footer_uri', function ($uri) {
25
            return Footer::query()
26
                ->where('uri', $uri)
27
                ->where('locale', config('app.locale'))
28
                ->firstOrFail();
29 16
        });
30
31 16
        $this->group(config('arcanesoft.seo.widgets.footers.route', []), function () {
0 ignored issues
show
Unused Code introduced by
The call to FootersRoutes::group() has too many arguments starting with function () { $this-...show')->name('show'); }.

This check compares calls to functions or methods with their respective definitions. If the call has more arguments than are defined, it raises an issue.

If a function is defined several times with a different number of parameters, the check may pick up the wrong definition and report false positives. One codebase where this has been known to happen is Wordpress.

In this case you can add the @ignore PhpDoc annotation to the duplicate definition and it will be ignored.

Loading history...
32 16
            $this->get('{seo_footer_uri}.html', 'FootersController@show')->name('show');
33 16
        });
34
    }
35
}
36