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