Completed
Push — master ( c6395c...b2af6e )
by ARCANEDEV
04:21
created

PostsRoutes   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 25
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 1
lcom 1
cbo 1
dl 0
loc 25
ccs 9
cts 9
cp 1
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A map() 0 13 1
1
<?php namespace Arcanesoft\Blog\Http\Routes\Front;
2
3
use Arcanedev\Support\Routing\RouteRegistrar;
4
5
/**
6
 * Class     PostsRoutes
7
 *
8
 * @package  Arcanesoft\Blog\Http\Routes\Front
9
 * @author   ARCANEDEV <[email protected]>
10
 */
11
class PostsRoutes extends RouteRegistrar
12
{
13
    /* ------------------------------------------------------------------------------------------------
14
     |  Main Functions
15
     | ------------------------------------------------------------------------------------------------
16
     */
17
    /**
18
     * Map routes.
19
     *
20
     * @param  \Illuminate\Contracts\Routing\Registrar  $router
0 ignored issues
show
Bug introduced by
There is no parameter named $router. Was it maybe removed?

This check looks for PHPDoc comments describing methods or function parameters that do not exist on the corresponding method or function.

Consider the following example. The parameter $italy is not defined by the method finale(...).

/**
 * @param array $germany
 * @param array $island
 * @param array $italy
 */
function finale($germany, $island) {
    return "2:1";
}

The most likely cause is that the parameter was removed, but the annotation was not.

Loading history...
21
     */
22
    public function map()
23
    {
24 6
        $this->prefix('posts')->name('posts.')->group(function () {
25 6
            $this->get('/', 'PostsController@index')
26 6
                 ->name('index');   // public::blog.posts.index
27
28 6
            $this->get('{slug}', 'PostsController@show')
29 6
                 ->name('show');    // public::blog.posts.show
30
31 6
            $this->get('{year}', 'PostsController@archive')
32 6
                 ->name('archive'); // public::blog.posts.archive
33 6
        });
34 6
    }
35
}
36