Completed
Push — master ( 8b0725...4a307c )
by Sergii
05:41
created

PubSubRouter   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 21
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
wmc 2
dl 0
loc 21
ccs 0
cts 5
cp 0
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A dispatch() 0 2 1
A addRoute() 0 2 1
1
<?php
2
/**
3
 * Created by PhpStorm.
4
 * @author Donii Sergii <[email protected]>
5
 * Date: 10/24/17
6
 * Time: 11:05 AM
7
 */
8
9
namespace sonrac\WAMP\Routers;
10
11
use sonrac\WAMP\Contracts\PubSubRouterInterface;
12
13
/**
14
 * Class PubSubRouter
15
 * Publisher/subscribers router
16
 *
17
 * @package sonrac\WAMP
18
 */
19
class PubSubRouter implements PubSubRouterInterface
20
{
21
    use RouterTrait;
22
23
    /**
24
     * @param string          $path      Route path
25
     * @param \Closure|string $callback  Callback
26
     * @param string          $eventName Event name in dispatcher
27
     *
28
     * @author Donii Sergii <[email protected]>
29
     */
30
    public function addRoute($path, $callback, $eventName)
0 ignored issues
show
Unused Code introduced by
The parameter $eventName 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

30
    public function addRoute($path, $callback, /** @scrutinizer ignore-unused */ $eventName)

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 $callback 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

30
    public function addRoute($path, /** @scrutinizer ignore-unused */ $callback, $eventName)

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 $path 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

30
    public function addRoute(/** @scrutinizer ignore-unused */ $path, $callback, $eventName)

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...
31
    {
32
33
    }
34
35
    /**
36
     * @inheritDoc
37
     */
38
    public function dispatch()
39
    {
40
41
    }
42
43
}
44