Total Complexity | 6 |
Total Lines | 44 |
Duplicated Lines | 0 % |
Changes | 2 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
24 | class HookManager |
||
25 | { |
||
26 | |||
27 | /** |
||
28 | * @var \Quantum\Hooks\HookManager|null |
||
29 | */ |
||
30 | private static $instance = null; |
||
31 | |||
32 | /** |
||
33 | * @return \Quantum\Hooks\HookManager|null |
||
34 | */ |
||
35 | public static function getInstance(): ?HookManager |
||
36 | { |
||
37 | if (self::$instance == null) { |
||
38 | self::$instance = new self(); |
||
39 | } |
||
40 | |||
41 | return self::$instance; |
||
42 | } |
||
43 | |||
44 | /** |
||
45 | * @param string $hookName |
||
46 | * @throws \Quantum\Exceptions\DiException |
||
47 | * @throws \ReflectionException |
||
48 | */ |
||
49 | public function __invoke(string $hookName) |
||
58 | } |
||
59 | } |
||
60 | } |
||
61 | |||
62 | /** |
||
63 | * @param \Quantum\Hooks\HookInterface $hook |
||
64 | */ |
||
65 | private function handleHook(HookInterface $hook) |
||
68 | } |
||
69 | |||
71 |