WebRoute   A
last analyzed

Complexity

Total Complexity 5

Size/Duplication

Total Lines 29
Duplicated Lines 0 %

Importance

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

5 Methods

Rating   Name   Duplication   Size   Complexity  
A post() 0 3 1
A matching() 0 3 1
A get() 0 5 1
A run() 0 3 1
A __construct() 0 3 1
1
<?php
2
3
namespace Synext\Routers;
4
5
use Synext\Routers\Router;
6
7
//implements RouterInterface use synexTest\Routers\RouterInterface;
8
class WebRoute
9
{
10
    private $router;
11
12
    public function __construct(Router $router)
13
    {
14
        $this->router = $router;
15
    }
16
17
    public function get(string $route, string $target, ?string $name = null): self
0 ignored issues
show
Unused Code introduced by
The parameter $name is not used and could be removed. ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-unused  annotation

17
    public function get(string $route, string $target, /** @scrutinizer ignore-unused */ ?string $name = null): self

This check looks for parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
18
    {
19
        $this->router->maping('GET', $route, $target);
20
21
        return $this;
22
    }
23
24
    public function post(string $route, string $target, ?string $name = null): Router
0 ignored issues
show
Unused Code introduced by
The parameter $target is not used and could be removed. ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-unused  annotation

24
    public function post(string $route, /** @scrutinizer ignore-unused */ string $target, ?string $name = null): Router

This check looks for parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
Unused Code introduced by
The parameter $route is not used and could be removed. ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-unused  annotation

24
    public function post(/** @scrutinizer ignore-unused */ string $route, string $target, ?string $name = null): Router

This check looks for parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
Unused Code introduced by
The parameter $name is not used and could be removed. ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-unused  annotation

24
    public function post(string $route, string $target, /** @scrutinizer ignore-unused */ ?string $name = null): Router

This check looks for parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
25
    {
26
        return $this->router;
27
    }
28
29
    public function run() : void
30
    {
31
        return ;
32
    }
33
34
    public function matching()
35
    {
36
        return $this->router->match();
37
    }
38
}
39