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.

ConditionFactory::factory()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 5

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 5
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 2
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\Condition;
10
11
class ConditionFactory
12
{
13
    /**
14
     * The decorator manger
15
     *
16
     * @var null| ConditionPluginManager
17
     */
18
    protected static $conditionManager = null;
19
20
    /**
21
     *
22
     * @param string $name
23
     * @param array $options
24
     * @return AbstractCondition
25
     */
26
    public static function factory($name, $options)
27
    {
28
        $condition = static::getPluginManager()->get($name, $options);
29
        return $condition;
30
    }
31
32
    /**
33
     * Get the condition plugin manager
34
     *
35
     * @return ConditionPluginManager
36
     */
37
    public static function getPluginManager()
38
    {
39
        if (static::$conditionManager === null) {
40
            static::$conditionManager = new ConditionPluginManager();
0 ignored issues
show
Documentation Bug introduced by
It seems like new \ZfTable\Decorator\C...onditionPluginManager() of type object<ZfTable\Decorator...ConditionPluginManager> is incompatible with the declared type null of property $conditionManager.

Our type inference engine has found an assignment to a property that is incompatible with the declared type of that property.

Either this assignment is in error or the assigned type should be added to the documentation/type hint for that property..

Loading history...
41
        }
42
        return static::$conditionManager;
43
    }
44
}
45