1 | <?php |
||
11 | abstract class AbstractConfig |
||
12 | { |
||
13 | protected static $configs; |
||
14 | |||
15 | /** |
||
16 | * @param $key |
||
17 | * @param array $replacements |
||
18 | * @param null $plugin |
||
19 | * |
||
20 | * @throws \Exception |
||
21 | * |
||
22 | * @return mixed |
||
23 | */ |
||
24 | 108 | public function get(string $key, array $replacements = [], $plugin = null) |
|
45 | |||
46 | /** |
||
47 | * @param $plugin |
||
48 | * |
||
49 | * @throws \Exception |
||
50 | * |
||
51 | * @return self |
||
|
|||
52 | */ |
||
53 | 4 | private function getPluginConfigObject($plugin): self |
|
64 | |||
65 | /** |
||
66 | * @param $plugin |
||
67 | * |
||
68 | * @throws \Exception |
||
69 | * |
||
70 | * @return array |
||
71 | */ |
||
72 | 3 | public function getPluginConfigs($plugin) |
|
80 | |||
81 | /** |
||
82 | * @return array |
||
83 | */ |
||
84 | 2 | public function getConfigs(): array |
|
88 | |||
89 | /** |
||
90 | * @param $key |
||
91 | * @param $value |
||
92 | * @param null $plugin |
||
93 | * |
||
94 | * @throws \Exception |
||
95 | */ |
||
96 | 38 | public function set($key, $value, $plugin = null) |
|
109 | } |
||
110 |
This check compares the return type specified in the
@return
annotation of a function or method doc comment with the types returned by the function and raises an issue if they mismatch.