Completed
Push — master ( f5d602...24c80e )
by WEBEWEB
01:41
created

RouterTrait::getRouter()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 3
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
1
<?php
2
3
/**
4
 * This file is part of the core-bundle package.
5
 *
6
 * (c) 2018 WEBEWEB
7
 *
8
 * For the full copyright and license information, please view the LICENSE
9
 * file that was distributed with this source code.
10
 */
11
12
namespace WBW\Bundle\CoreBundle\Service;
13
14
use Symfony\Component\Routing\RouterInterface;
15
16
/**
17
 * Router trait.
18
 *
19
 * @author webeweb <https://github.com/webeweb/>
20
 * @package WBW\Bundle\CoreBundle\Service
21
 */
22
trait RouterTrait {
23
24
    /**
25
     * Router.
26
     *
27
     * @var RouterInterface
28
     */
29
    private $router;
30
31
    /**
32
     * Get the router.
33
     *
34
     * @return RouterInterface Returns the router.
35
     */
36
    public function getRouter() {
37
        return $this->router;
38
    }
39
40
    /**
41
     * Set the router.
42
     *
43
     * @param RouterInterface $router The router.
44
     */
45
    protected function setRouter(RouterInterface $router) {
46
        $this->router = $router;
47
        return $this;
48
    }
49
50
}
51