Passed
Push — master ( 47699c...d74cf0 )
by Rougin
01:47
created

RouteCollection   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 23
Duplicated Lines 0 %

Test Coverage

Coverage 83.33%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 23
ccs 5
cts 6
cp 0.8333
rs 10
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A routes() 0 9 1
1
<?php
2
3
namespace App\Zapheus;
4
5
use Zapheus\Routing\Router;
6
7
/**
8
 * Route Collection
9
 *
10
 * @package App
11
 * @author  Rougin Royce Gutib <[email protected]>
12
 */
13
class RouteCollection extends Router
14
{
15
    /**
16
     * Namespace applied to all class-based routes.
17
     *
18
     * @var string
19
     */
20
    protected $namespace = 'App\Zapheus';
21
22
    /**
23
     * Returns an array of route instances.
24
     *
25
     * @return \Zapheus\Routing\Route[]
26
     */
27 6
    public function routes()
28
    {
29 6
        $this->get('/{name}', 'GreetController@greet');
30
31 6
        $this->get('/', 'GreetController@greet');
32
33 6
        $this->get('/scream', 'GreetController@scream');
34
35 6
        return $this->routes;
36
    }
37
}
38