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