Completed
Push — master ( ef610a...dc0762 )
by Gabor
24:45
created

FakeRouter   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 16
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 1
Bugs 0 Features 1
Metric Value
wmc 1
c 1
b 0
f 1
lcom 0
cbo 1
dl 0
loc 16
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A match() 0 6 1
1
<?php
2
/**
3
 * WebHemi.
4
 *
5
 * PHP version 5.6
6
 *
7
 * @copyright 2012 - 2016 Gixx-web (http://www.gixx-web.com)
8
 * @license   https://opensource.org/licenses/MIT The MIT License (MIT)
9
 *
10
 * @link      http://www.gixx-web.com
11
 */
12
namespace WebHemi\Adapter\Router;
13
14
use Psr\Http\Message\ServerRequestInterface;
15
use WebHemi\Routing\Result;
16
17
/**
18
 * Class FakeRouter
19
 */
20
class FakeRouter implements RouterAdapterInterface
21
{
22
    /**
23
     * Processes the Request and give a Result.
24
     *
25
     * @param ServerRequestInterface $request
26
     *
27
     * @return Result
28
     */
29
    public function match(ServerRequestInterface $request)
30
    {
31
        $routeResult = new Result($request);
0 ignored issues
show
Unused Code introduced by
The call to Result::__construct() has too many arguments starting with $request.

This check compares calls to functions or methods with their respective definitions. If the call has more arguments than are defined, it raises an issue.

If a function is defined several times with a different number of parameters, the check may pick up the wrong definition and report false positives. One codebase where this has been known to happen is Wordpress.

In this case you can add the @ignore PhpDoc annotation to the duplicate definition and it will be ignored.

Loading history...
32
33
        return $routeResult;
34
    }
35
}
36