Skip to content

Commit 6280031

Browse files
committed
MAGETWO-38857: Decrease crap
1 parent b2e6eb6 commit 6280031

File tree

3 files changed

+8
-11
lines changed

3 files changed

+8
-11
lines changed

app/code/Magento/Sitemap/Controller/Adminhtml/Sitemap/Save.php

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
<?php
22
/**
3-
*
43
* Copyright © 2015 Magento. All rights reserved.
54
* See COPYING.txt for license details.
65
*/
@@ -15,11 +14,11 @@ class Save extends \Magento\Sitemap\Controller\Adminhtml\Sitemap
1514
/**
1615
* Validate path to generate
1716
*
18-
* @param $data
17+
* @param array $data
1918
* @return bool
2019
* @throws \Exception
2120
*/
22-
protected function validatePathToGenerate($data)
21+
protected function validatePathToGenerate(array $data)
2322
{
2423
if (!empty($data['sitemap_filename']) && !empty($data['sitemap_path'])) {
2524
$data['sitemap_path'] = '/' . ltrim($data['sitemap_path'], '/');
@@ -45,9 +44,10 @@ protected function validatePathToGenerate($data)
4544
/**
4645
* Clear sitemap
4746
*
48-
* @param $model
47+
* @param \Magento\Sitemap\Model\Sitemap $model
48+
* @return void
4949
*/
50-
protected function clearSiteMap($model)
50+
protected function clearSiteMap(\Magento\Sitemap\Model\Sitemap $model)
5151
{
5252
/** @var \Magento\Framework\Filesystem\Directory\Write $directory */
5353
$directory = $this->_objectManager->get('Magento\Framework\Filesystem')
@@ -105,7 +105,7 @@ protected function saveModel($data)
105105
$this->_objectManager->get('Magento\Backend\Model\Session')->setFormData($data);
106106
// redirect to edit form
107107
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')]);
109109
}
110110
}
111111

@@ -131,5 +131,4 @@ public function execute()
131131
}
132132
return $this->resultFactory->create(Controller\ResultFactory::TYPE_REDIRECT)->setPath('adminhtml/*/');
133133
}
134-
135134
}

app/code/Magento/Sitemap/Test/Unit/Controller/Adminhtml/Sitemap/SaveTest.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,7 @@
33
* Copyright © 2015 Magento. All rights reserved.
44
* See COPYING.txt for license details.
55
*/
6-
7-
namespace Magento\Sitemap\Test\Unit\Controller\Adminhtml;
8-
6+
namespace Magento\Sitemap\Test\Unit\Controller\Adminhtml\Sitemap;
97

108
class SaveTest extends \PHPUnit_Framework_TestCase
119
{

app/code/Magento/Widget/Model/Widget.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -359,7 +359,7 @@ public function getPlaceholderImageUrls()
359359
}
360360

361361
/**
362-
* Remove attributes from widget array so that emulates how \Magento\Framework\Simplexml\Element::asCanonicalArray works
362+
* Remove attributes from widget array and emulates how \Magento\Framework\Simplexml\Element::asCanonicalArray works
363363
*
364364
* @param array $inputArray
365365
* @return array

0 commit comments

Comments
 (0)