| Conditions | 3 |
| Paths | 3 |
| Total Lines | 12 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 8 |
| CRAP Score | 3 |
| Changes | 0 | ||
| 1 | <?php |
||
| 73 | 3 | public function getSitemap() { |
|
| 74 | 3 | if (!empty(\yii::$app->components['sitemap'])) { |
|
| 75 | 1 | $result = \yii::$app->components['sitemap']; |
|
| 76 | 3 | } else if (!($result = $this->_sitemap)) { |
|
| 77 | 1 | throw new Exception('Component for sitemap module is required. Define it via application components ' |
|
| 78 | 1 | . 'or module components'); |
|
| 79 | } |
||
| 80 | |||
| 81 | 2 | $result->module = $this; |
|
| 82 | |||
| 83 | 2 | return $result; |
|
| 84 | } |
||
| 85 | } |
||
| 86 |