| Conditions | 3 |
| Paths | 2 |
| Total Lines | 15 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 0 |
| CRAP Score | 12 |
| Changes | 0 | ||
| 1 | <?php |
||
| 42 | protected function createRules() |
||
| 43 | { |
||
| 44 | $this->moduleId ?: throw new InvalidConfigException( |
||
| 45 | $this::class . '::$moduleId must be set.' |
||
| 46 | ); |
||
| 47 | |||
| 48 | $module = Yii::$app->getModule($this->moduleId); |
||
| 49 | if (!$module instanceof UrlRuleCreator) { |
||
| 50 | throw new InvalidConfigException( |
||
| 51 | "Module `{$this->moduleId}` must implement " |
||
| 52 | . UrlRuleCreator::class |
||
| 53 | ); |
||
| 54 | } |
||
| 55 | |||
| 56 | return $module->createUrlRules($this); |
||
| 57 | } |
||
| 69 |