Skip to content

Commit 5dbc9ef

Browse files
committed
MAGETWO-59325: Unable to add custom attribute to product
- Removed unused private method; - Added suppress warning to unit test;
1 parent e571e53 commit 5dbc9ef

File tree

2 files changed

+3
-12
lines changed

2 files changed

+3
-12
lines changed

app/code/Magento/Catalog/Controller/Adminhtml/Product/AddAttributeToTemplate.php

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -251,18 +251,6 @@ private function getSearchCriteriaBuilder()
251251
return $this->searchCriteriaBuilder;
252252
}
253253

254-
/**
255-
* @return SortOrderBuilder
256-
*/
257-
private function getSortOrderBuilder()
258-
{
259-
if (null === $this->sortOrderBuilder) {
260-
$this->sortOrderBuilder = \Magento\Framework\App\ObjectManager::getInstance()
261-
->get(\Magento\Framework\Api\SortOrderBuilder::class);
262-
}
263-
return $this->sortOrderBuilder;
264-
}
265-
266254
/**
267255
* @return AttributeManagementInterface
268256
*/

app/code/Magento/Catalog/Test/Unit/Controller/Adminhtml/Product/AddAttributeToTemplateTest.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,9 @@
2222
use Magento\Eav\Api\Data\AttributeGroupInterface;
2323
use Magento\Framework\Controller\Result\Json;
2424

25+
/**
26+
* @SuppressWarnings(PHPMD.CouplingBetweenObjects)
27+
*/
2528
class AddAttributeToTemplateTest extends \PHPUnit_Framework_TestCase
2629
{
2730
/**

0 commit comments

Comments
 (0)