1 | <?php |
||
13 | class Singleton |
||
14 | { |
||
15 | use SingletonTrait; |
||
16 | |||
17 | /** |
||
18 | * Singleton constructor. |
||
19 | * @throws \Exception |
||
20 | * @throws exception\GeneratorException |
||
21 | * @throws ConfigException |
||
22 | */ |
||
23 | 12 | public function __construct() |
|
28 | |||
29 | /** |
||
30 | * @param string $variable |
||
31 | * @param mixed $value |
||
32 | */ |
||
33 | public function __set($variable, $value) |
||
39 | |||
40 | /** |
||
41 | * @param string $name |
||
42 | * @return bool |
||
43 | */ |
||
44 | public function __isset($name) |
||
48 | |||
49 | /** |
||
50 | * @param string $variable |
||
51 | * @return mixed |
||
52 | */ |
||
53 | public function __get($variable) |
||
57 | |||
58 | /** |
||
59 | * HELPERS |
||
60 | */ |
||
61 | |||
62 | /** |
||
63 | * @return string |
||
64 | * @throws \ReflectionException |
||
65 | */ |
||
66 | public function getShortName() |
||
71 | |||
72 | /** |
||
73 | * @param string $variable |
||
74 | * @param bool $singleton |
||
75 | * @param string $classNameSpace |
||
|
|||
76 | * @return $this |
||
77 | * @throws \Exception |
||
78 | */ |
||
79 | public function load($variable, $singleton = true, $classNameSpace = null) |
||
96 | |||
97 | /** |
||
98 | * @throws \Exception |
||
99 | * @throws exception\GeneratorException |
||
100 | * @throws ConfigException |
||
101 | */ |
||
102 | public function init() |
||
128 | } |
||
129 |
This check looks for
@param
annotations where the type inferred by our type inference engine differs from the declared type.It makes a suggestion as to what type it considers more descriptive.
Most often this is a case of a parameter that can be null in addition to its declared types.