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

PostsRoutes::map()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 13
Code Lines 8

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 9
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 13
ccs 9
cts 9
cp 1
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 8
nc 1
nop 0
crap 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