diff --git a/src/controllers/SitemapController.php b/src/controllers/SitemapController.php index 9a6cc8e..a85bdaa 100644 --- a/src/controllers/SitemapController.php +++ b/src/controllers/SitemapController.php @@ -18,7 +18,7 @@ class SitemapController extends Controller { /** * Return the sitemap xml content. - * + * * @return \yii\web\Response */ public function actionIndex() @@ -66,11 +66,11 @@ private function buildSitemapfile($sitemapFile) $query->andWhere(['is_hidden' => false]); } - foreach($query->each() as $nav) { + foreach ($query->each() as $nav) { /** @var Nav $nav */ $urls = []; - foreach($nav->navItems as $navItem) { + foreach ($nav->navItems as $navItem) { /** @var NavItem $navItem */ $urls[$navItem->lang->short_code] = Yii::$app->request->hostInfo . Yii::$app->menu->buildItemLink($navItem->alias, $navItem->lang->short_code); @@ -80,10 +80,9 @@ private function buildSitemapfile($sitemapFile) var_dump($urls); $sitemap->addItem($urls, $lastModified); } - } // write sitemap files $sitemap->write(); } -} \ No newline at end of file +} diff --git a/tests/SitemapControllerTest.php b/tests/SitemapControllerTest.php index 9ecb59c..cecf0e3 100644 --- a/tests/SitemapControllerTest.php +++ b/tests/SitemapControllerTest.php @@ -47,7 +47,7 @@ public function testIgnoreHiddenModuleProperty() $response = $ctrl->actionIndex(); $stream = $response->stream; - // @TODO: Does not deliver the xml stream content ... + // @TODO: Does not deliver the xml stream content ... $content = stream_get_contents($stream[0]); // @TODO: change content @@ -108,7 +108,7 @@ private function prepareBasicTableStructureAndData() ])); $langFixture = (new ActiveRecordFixture([ - 'modelClass' => Lang::class, + 'modelClass' => Lang::class, 'fixtureData' => [ 'model1' => [ 'id' => 1, @@ -120,4 +120,4 @@ private function prepareBasicTableStructureAndData() ] ])); } -} \ No newline at end of file +}