1
1
<?php
2
2
/**
3
- *
4
3
* Copyright © 2015 Magento. All rights reserved.
5
4
* See COPYING.txt for license details.
6
5
*/
@@ -15,11 +14,11 @@ class Save extends \Magento\Sitemap\Controller\Adminhtml\Sitemap
15
14
/**
16
15
* Validate path to generate
17
16
*
18
- * @param $data
17
+ * @param array $data
19
18
* @return bool
20
19
* @throws \Exception
21
20
*/
22
- protected function validatePathToGenerate ($ data )
21
+ protected function validatePathToGenerate (array $ data )
23
22
{
24
23
if (!empty ($ data ['sitemap_filename ' ]) && !empty ($ data ['sitemap_path ' ])) {
25
24
$ data ['sitemap_path ' ] = '/ ' . ltrim ($ data ['sitemap_path ' ], '/ ' );
@@ -45,9 +44,10 @@ protected function validatePathToGenerate($data)
45
44
/**
46
45
* Clear sitemap
47
46
*
48
- * @param $model
47
+ * @param \Magento\Sitemap\Model\Sitemap $model
48
+ * @return void
49
49
*/
50
- protected function clearSiteMap ($ model )
50
+ protected function clearSiteMap (\ Magento \ Sitemap \ Model \ Sitemap $ model )
51
51
{
52
52
/** @var \Magento\Framework\Filesystem\Directory\Write $directory */
53
53
$ directory = $ this ->_objectManager ->get ('Magento\Framework\Filesystem ' )
@@ -105,7 +105,7 @@ protected function saveModel($data)
105
105
$ this ->_objectManager ->get ('Magento\Backend\Model\Session ' )->setFormData ($ data );
106
106
// redirect to edit form
107
107
return $ this ->resultFactory ->create (Controller \ResultFactory::TYPE_REDIRECT )
108
- ->setPath ('adminhtml/*/edit ' ,['sitemap_id ' => $ this ->getRequest ()->getParam ('sitemap_id ' )]);
108
+ ->setPath ('adminhtml/*/edit ' , ['sitemap_id ' => $ this ->getRequest ()->getParam ('sitemap_id ' )]);
109
109
}
110
110
}
111
111
@@ -131,5 +131,4 @@ public function execute()
131
131
}
132
132
return $ this ->resultFactory ->create (Controller \ResultFactory::TYPE_REDIRECT )->setPath ('adminhtml/*/ ' );
133
133
}
134
-
135
134
}
0 commit comments