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.

DecoratorFactory::getPluginManager()   A
last analyzed

Complexity

Conditions 2
Paths 2

Size

Total Lines 7

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 7
rs 10
c 0
b 0
f 0
cc 2
nc 2
nop 0
1
<?php
2
/**
3
 * ZfTable ( Module for Zend Framework 2)
4
 *
5
 * @copyright Copyright (c) 2013 Piotr Duda [email protected]
6
 * @license   MIT License
7
 */
8
9
namespace ZfTable\Decorator;
10
11
class DecoratorFactory
12
{
13
14
    /**
15
     * The decorator manger
16
     *
17
     * @var null|DecoratorPluginManager
18
     */
19
    protected static $decoratorManager = null;
20
21
    const CELL_PREFIX = 'cell';
22
    const HEADER_PREFIX = 'header';
23
    const ROW_PREFIX = 'row';
24
25
    /**
26
     *
27
     * @param string $name
28
     * @param array $options
29
     * @return AbstractDecorator
30
     */
31
    public static function factoryCell($name, $options)
32
    {
33
        $decorator = static::getPluginManager()->get(self::CELL_PREFIX . $name, $options);
34
        return $decorator;
35
    }
36
37
    /**
38
     *
39
     * @param string $name
40
     * @param array $options
41
     * @return AbstractDecorator
42
     */
43
    public static function factoryRow($name, $options)
44
    {
45
        $decorator = static::getPluginManager()->get(self::ROW_PREFIX . $name, $options);
46
        return $decorator;
47
    }
48
49
    /**
50
     *
51
     * @param string $name
52
     * @param array $options
53
     * @return AbstractDecorator
54
     */
55
    public static function factoryHeader($name, $options)
56
    {
57
        $decorator = static::getPluginManager()->get(self::HEADER_PREFIX . $name, $options);
58
        return $decorator;
59
    }
60
61
    /**
62
     * Get the pattern plugin manager
63
     *
64
     * @return DecoratorPluginManager
65
     */
66
    public static function getPluginManager()
67
    {
68
        if (static::$decoratorManager === null) {
69
            static::$decoratorManager = new DecoratorPluginManager();
70
        }
71
        return static::$decoratorManager;
72
    }
73
}
74