| Conditions | 2 |
| Paths | 2 |
| Total Lines | 14 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 31 | protected function registerIdeHelperHook(): void |
||
| 32 | { |
||
| 33 | /** @var \Illuminate\Contracts\Config\Repository $config */ |
||
| 34 | $config = $this->app->get('config'); |
||
| 35 | |||
| 36 | if (!$config->get('eloquent-has-many-deep.ide_helper_enabled')) { |
||
| 37 | return; |
||
| 38 | } |
||
| 39 | |||
| 40 | $config->set( |
||
| 41 | 'ide-helper.model_hooks', |
||
| 42 | array_merge( |
||
| 43 | [DeepRelationsHook::class], |
||
| 44 | $config->get('ide-helper.model_hooks', []) |
||
| 45 | ) |
||
| 64 |