Router   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 26
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 5
dl 0
loc 26
rs 10
c 1
b 0
f 0
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A addRoute() 0 6 1
1
<?php
2
3
namespace Sulao\LRTS\Routing;
4
5
class Router extends \Illuminate\Routing\Router
6
{
7
    /**
8
     * What to do when current route mismatched because of trailing slash,
9
     * null: do nothing.
10
     * 404: abort 404, not found exception will be threw.
11
     * 301/302: redirect to the url with trailing slash.
12
     *
13
     * @var null|int
14
     */
15
    public static $mismatchAction = null;
16
17
    /**
18
     * Add a route to the underlying route collection.
19
     *
20
     * @param  array|string  $methods
21
     * @param  string  $uri
22
     * @param  array|string|callable|null  $action
23
     * @return \Illuminate\Routing\Route
24
     */
25
    public function addRoute($methods, $uri, $action)
26
    {
27
        $route = parent::addRoute($methods, $uri, $action);
28
        $route->originalUri = $uri;
0 ignored issues
show
Bug introduced by
The property originalUri does not seem to exist on Illuminate\Routing\Route.
Loading history...
29
30
        return $route;
31
    }
32
}
33