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   A

Complexity

Total Complexity 4

Size/Duplication

Total Lines 41
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 3

Test Coverage

Coverage 100%

Importance

Changes 3
Bugs 0 Features 1
Metric Value
wmc 4
c 3
b 0
f 1
lcom 1
cbo 3
dl 0
loc 41
ccs 11
cts 11
cp 1
rs 10

3 Methods

Rating   Name   Duplication   Size   Complexity  
A shouldCache() 0 12 2
A getControllers() 0 4 1
A setControllers() 0 5 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