OldIpVoter::getRangeManager()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 1 Features 0
Metric Value
c 1
b 1
f 0
dl 0
loc 4
rs 10
cc 1
eloc 2
nc 1
nop 0
1
<?php
2
3
/*
4
 * The MIT License (MIT)
5
 *
6
 * Copyright (c) 2014-2015 Spomky-Labs
7
 *
8
 * This software may be modified and distributed under the terms
9
 * of the MIT license.  See the LICENSE file for details.
10
 */
11
12
namespace SpomkyLabs\IpFilterBundle\Voter;
13
14
use SpomkyLabs\IpFilterBundle\Model\IpManagerInterface;
15
use SpomkyLabs\IpFilterBundle\Model\RangeManagerInterface;
16
use Symfony\Component\DependencyInjection\ContainerInterface;
17
18
class OldIpVoter extends BaseIpVoter
19
{
20
    protected $environment;
21
    protected $container;
22
    protected $im;
23
    protected $rm;
24
25
    public function __construct($environment, ContainerInterface $container, IpManagerInterface $im, RangeManagerInterface $rm)
26
    {
27
        $this->environment = $environment;
28
        $this->container = $container;
29
        $this->im = $im;
30
        $this->rm = $rm;
31
    }
32
33
    protected function getRequest()
34
    {
35
        return $this->container->get('request');
36
    }
37
38
    protected function getEnvironment()
39
    {
40
        return $this->environment;
41
    }
42
43
    protected function getIpManager()
44
    {
45
        return $this->im;
46
    }
47
48
    protected function getRangeManager()
49
    {
50
        return $this->rm;
51
    }
52
}
53