Completed
Push — master ( c12270...10319f )
by Sergii
04:52
created

PubSubRouter::dispatch()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 2
Code Lines 0

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
dl 0
loc 2
c 0
b 0
f 0
ccs 0
cts 2
cp 0
rs 10
cc 1
eloc 0
nc 1
nop 0
crap 2
1
<?php
2
/**
3
 * Created by PhpStorm.
4
 *
5
 * @author Donii Sergii <[email protected]>
6
 * Date: 10/24/17
7
 * Time: 11:05 AM
8
 */
9
10
namespace sonrac\WAMP\Routers;
11
12
use sonrac\WAMP\Contracts\PubSubRouterInterface;
13
14
/**
15
 * Class PubSubRouter
16
 * Publisher/subscribers router.
17
 */
18
class PubSubRouter implements PubSubRouterInterface
19
{
20
    use RouterTrait;
21
22
    /**
23
     * @param string          $path      Route path
24
     * @param \Closure|string $callback  Callback
25
     * @param string          $eventName Event name in dispatcher
26
     *
27
     * @author Donii Sergii <[email protected]>
28
     */
29
    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

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

29
    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...
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

29
    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...
30
    {
31
    }
32
}
33