TopicRoute::__construct()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 10
Code Lines 7

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 10
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 7
nc 1
nop 4
1
<?php
2
3
namespace Eole\Sandstone\Websocket\Routing;
4
5
use Silex\Route;
6
7
class TopicRoute extends Route
8
{
9
    /**
10
     * @param string $topicPath
11
     * @param callable $topicFactory
12
     * @param array $defaults
13
     * @param array $requirements
14
     */
15
    public function __construct(
16
        $topicPath,
17
        callable $topicFactory,
18
        array $defaults = array(),
19
        array $requirements = array()
20
    ) {
21
        $defaults['_topic_factory'] = $topicFactory;
22
23
        parent::__construct($topicPath, $defaults, $requirements);
24
    }
25
}
26