Total Complexity | 4 |
Total Lines | 28 |
Duplicated Lines | 0 % |
Changes | 5 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
18 | abstract class BaseFoundationCollection extends Collection |
||
19 | { |
||
20 | protected HydeKernel $kernel; |
||
21 | |||
22 | abstract protected function runDiscovery(): self; |
||
23 | |||
24 | public static function boot(HydeKernel $kernel): static |
||
25 | { |
||
26 | return (new static())->setKernel($kernel)->runDiscovery(); |
||
27 | } |
||
28 | |||
29 | protected function __construct(array $items = []) |
||
30 | { |
||
31 | parent::__construct($items); |
||
|
|||
32 | } |
||
33 | |||
34 | /** @return $this */ |
||
35 | protected function setKernel(HydeKernel $kernel): static |
||
40 | } |
||
41 | |||
42 | /** @return $this */ |
||
43 | public function getInstance(): static |
||
48 |