Skip to content

Commit 0d36dd1

Browse files
ENGCOM-6140: Remove useless aliases for imports #24871
- Merge Pull Request #24871 from carusogabriel/magento2:style/remove-useless-alias - Merged commits: 1. e8cfc55 2. 3e33815
2 parents a0c3c03 + 3e33815 commit 0d36dd1

File tree

12 files changed

+47
-40
lines changed

12 files changed

+47
-40
lines changed

dev/tests/api-functional/testsuite/Magento/GraphQl/ConfigurableProduct/UpdateConfigurableCartItemsTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
namespace Magento\GraphQl\ConfigurableProduct;
1010

1111
use Magento\ConfigurableProduct\Model\Product\Type\Configurable;
12-
use Magento\Framework\Exception\NoSuchEntityException as NoSuchEntityException;
12+
use Magento\Framework\Exception\NoSuchEntityException;
1313
use Magento\GraphQl\Quote\GetMaskedQuoteIdByReservedOrderId;
1414
use Magento\Quote\Model\Quote\Item;
1515
use Magento\Quote\Model\QuoteFactory;

dev/tests/api-functional/testsuite/Magento/GraphQl/Quote/EditQuoteItemWithCustomOptionsTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
use Magento\Catalog\Api\ProductCustomOptionRepositoryInterface;
1111
use Magento\Catalog\Api\ProductRepositoryInterface;
12-
use Magento\Framework\Exception\NoSuchEntityException as NoSuchEntityException;
12+
use Magento\Framework\Exception\NoSuchEntityException;
1313
use Magento\Quote\Model\Quote\Item;
1414
use Magento\Quote\Model\QuoteFactory;
1515
use Magento\Quote\Model\ResourceModel\Quote as QuoteResource;

dev/tests/integration/testsuite/Magento/Downloadable/_files/product_downloadable_with_custom_options.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
* See COPYING.txt for license details.
55
*/
66

7-
use Magento\TestFramework\Helper\Bootstrap as Bootstrap;
7+
use Magento\TestFramework\Helper\Bootstrap;
88

99
require __DIR__ . '/product_downloadable_with_purchased_separately_links.php';
1010

dev/tests/integration/testsuite/Magento/Downloadable/_files/product_downloadable_with_purchased_separately_links.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
*/
66
declare(strict_types=1);
77

8-
use Magento\TestFramework\Helper\Bootstrap as Bootstrap;
8+
use Magento\TestFramework\Helper\Bootstrap;
99
use Magento\Catalog\Model\Product\Attribute\Source\Status as ProductStatus;
1010
use Magento\Downloadable\Model\Product\Type as ProductType;
1111
use Magento\Catalog\Model\Product\Visibility as ProductVisibility;

dev/tests/integration/testsuite/Magento/Downloadable/_files/product_downloadable_without_purchased_separately_links.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
*/
66
declare(strict_types=1);
77

8-
use Magento\TestFramework\Helper\Bootstrap as Bootstrap;
8+
use Magento\TestFramework\Helper\Bootstrap;
99
use Magento\Catalog\Model\Product\Attribute\Source\Status as ProductStatus;
1010
use Magento\Downloadable\Model\Product\Type as ProductType;
1111
use Magento\Catalog\Model\Product\Visibility as ProductVisibility;

dev/tests/static/framework/Magento/CodeMessDetector/Test/Unit/Rule/Design/AllPurposeActionTest.php

Lines changed: 21 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@
1111
use Magento\CodeMessDetector\Rule\Design\AllPurposeAction;
1212
use Magento\Framework\App\Action\HttpGetActionInterface;
1313
use Magento\Framework\App\ActionInterface;
14-
use PHPUnit\Framework\TestCase as TestCase;
14+
use PHPUnit\Framework\TestCase;
1515
use PHPUnit_Framework_MockObject_MockObject as MockObject;
16-
use PHPUnit\Framework\MockObject\Builder\InvocationMocker as InvocationMocker;
16+
use PHPUnit\Framework\MockObject\Builder\InvocationMocker;
1717
use PHPMD\Report;
1818
use PHPMD\Node\ClassNode;
1919

@@ -40,7 +40,8 @@ public function getCases(): array
4040
{
4141
return [
4242
[
43-
new class implements ActionInterface, HttpGetActionInterface {
43+
new class implements ActionInterface, HttpGetActionInterface
44+
{
4445
/**
4546
* @inheritDoc
4647
*/
@@ -52,7 +53,8 @@ public function execute()
5253
false
5354
],
5455
[
55-
new class implements ActionInterface {
56+
new class implements ActionInterface
57+
{
5658
/**
5759
* @inheritDoc
5860
*/
@@ -64,7 +66,8 @@ public function execute()
6466
true
6567
],
6668
[
67-
new class implements HttpGetActionInterface {
69+
new class implements HttpGetActionInterface
70+
{
6871
/**
6972
* @inheritDoc
7073
*/
@@ -76,7 +79,8 @@ public function execute()
7679
false
7780
],
7881
[
79-
new class {
82+
new class
83+
{
8084

8185
},
8286
false
@@ -94,13 +98,15 @@ private function createNodeMock($dynamicObject): MockObject
9498
$node = $this->getMockBuilder(ClassNode::class)
9599
->disableOriginalConstructor()
96100
->disableProxyingToOriginalMethods()
97-
->setMethods([
98-
// disable name lookup from AST artifact
99-
'getNamespaceName',
100-
'getParentName',
101-
'getName',
102-
'getFullQualifiedName',
103-
])
101+
->setMethods(
102+
[
103+
// disable name lookup from AST artifact
104+
'getNamespaceName',
105+
'getParentName',
106+
'getName',
107+
'getFullQualifiedName',
108+
]
109+
)
104110
->getMock();
105111
$node->expects($this->any())
106112
->method('getFullQualifiedName')
@@ -114,10 +120,8 @@ private function createNodeMock($dynamicObject): MockObject
114120
* @param bool $expects
115121
* @return InvocationMocker
116122
*/
117-
private function expectsRuleViolation(
118-
AllPurposeAction $rule,
119-
bool $expects
120-
): InvocationMocker {
123+
private function expectsRuleViolation(AllPurposeAction $rule, bool $expects): InvocationMocker
124+
{
121125
/** @var Report|MockObject $report */
122126
$report = $this->getMockBuilder(Report::class)->getMock();
123127
if ($expects) {

lib/internal/Magento/Framework/Acl/Loader/ResourceLoader.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
namespace Magento\Framework\Acl\Loader;
99

1010
use Magento\Framework\Acl;
11-
use Magento\Framework\Acl\AclResource as AclResource;
11+
use Magento\Framework\Acl\AclResource;
1212
use Magento\Framework\Acl\AclResource\ProviderInterface;
1313
use Magento\Framework\Acl\AclResourceFactory;
1414

lib/internal/Magento/Framework/Api/ExtensionAttribute/JoinProcessor.php

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
namespace Magento\Framework\Api\ExtensionAttribute;
88

99
use Magento\Framework\Api\ExtensionAttribute\Config;
10-
use Magento\Framework\Api\ExtensionAttribute\Config\Converter as Converter;
10+
use Magento\Framework\Api\ExtensionAttribute\Config\Converter;
1111
use Magento\Framework\Data\Collection\AbstractDb as DbCollection;
1212
use Magento\Framework\Reflection\TypeProcessor;
1313
use Magento\Framework\Api\ExtensibleDataInterface;
@@ -61,7 +61,7 @@ public function __construct(
6161
}
6262

6363
/**
64-
* {@inheritdoc}
64+
* @inheritdoc
6565
*/
6666
public function process(DbCollection $collection, $extensibleEntityClass = null)
6767
{
@@ -95,7 +95,7 @@ private function getReferenceTableAlias($attributeCode)
9595
}
9696

9797
/**
98-
* {@inheritdoc}
98+
* @inheritdoc
9999
*/
100100
public function extractExtensionAttributes($extensibleEntityClass, array $data)
101101
{
@@ -127,10 +127,9 @@ public function extractExtensionAttributes($extensibleEntityClass, array $data)
127127
*
128128
* @param string $attributeCode
129129
* @param array $directive
130-
* @param array &$data
131-
* @param array &$extensionData
130+
* @param array $data
131+
* @param array $extensionData
132132
* @param string $extensibleEntityClass
133-
* @return void
134133
*/
135134
private function populateAttributeCodeWithDirective(
136135
$attributeCode,

lib/internal/Magento/Framework/Api/ExtensionAttribute/JoinProcessorHelper.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
namespace Magento\Framework\Api\ExtensionAttribute;
88

99
use Magento\Framework\Api\ExtensionAttribute\Config;
10-
use Magento\Framework\Api\ExtensionAttribute\Config\Converter as Converter;
10+
use Magento\Framework\Api\ExtensionAttribute\Config\Converter;
1111
use Magento\Framework\Api\SimpleDataObjectConverter;
1212

1313
/**

lib/internal/Magento/Framework/Controller/Test/Unit/Router/Route/FactoryTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
use \Magento\Framework\Controller\Router\Route\Factory;
1010

1111
use Magento\Framework\Controller\Router\Route\Factory as RouteFactory;
12-
use Magento\Framework\TestFramework\Unit\Helper\ObjectManager as ObjectManager;
12+
use Magento\Framework\TestFramework\Unit\Helper\ObjectManager;
1313

1414
class FactoryTest extends \PHPUnit\Framework\TestCase
1515
{

0 commit comments

Comments
 (0)