GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.
Completed
Push — master ( 66c18c...f0be87 )
by Bram
05:17
created

Controller::setControllers()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 3
CRAP Score 1

Importance

Changes 2
Bugs 0 Features 1
Metric Value
c 2
b 0
f 1
dl 0
loc 5
ccs 3
cts 3
cp 1
rs 9.4285
cc 1
eloc 3
nc 1
nop 1
crap 1
1
<?php
2
/**
3
 * @author Bram Gerritsen [email protected]
4
 * @copyright (c) Bram Gerritsen 2013
5
 * @license http://opensource.org/licenses/mit-license.php
6
 */
7
8
namespace StrokerCache\Strategy;
9
10
use Zend\Mvc\MvcEvent;
11
12
class Controller extends AbstractStrategy
13
{
14
    /**
15
     * @var array
16
     */
17
    protected $controllers;
18
19
    /**
20
     * {@inheritDoc}
21
     */
22 4
    public function shouldCache(MvcEvent $event)
23
    {
24 4
        $routeMatch = $event->getRouteMatch();
25
26 4
        if (null === $routeMatch) {
27 1
            return false;
28
        }
29
30 3
        $controller = $routeMatch->getParam('controller');
31
32 3
        return in_array($controller, $this->getControllers());
33
    }
34
35
    /**
36
     * @return array
37
     */
38 3
    public function getControllers()
39
    {
40 3
        return $this->controllers;
41
    }
42
43
    /**
44
     * @param array $controllers
45
     * @return $this
46
     */
47 4
    public function setControllers(array $controllers)
48
    {
49 4
        $this->controllers = $controllers;
50 4
        return $this;
51
    }
52
}
53