Skip to content

Commit 6904e8c

Browse files
authored
ENGCOM-7673: Removed unused class imports #28696
2 parents ac823c0 + 04ce55a commit 6904e8c

12 files changed

+130
-139
lines changed

app/code/Magento/Customer/Setup/Patch/Data/AddCustomerUpdatedAtAttribute.php

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,19 +3,18 @@
33
* Copyright © Magento, Inc. All rights reserved.
44
* See COPYING.txt for license details.
55
*/
6+
declare(strict_types=1);
67

78
namespace Magento\Customer\Setup\Patch\Data;
89

910
use Magento\Customer\Model\Customer;
1011
use Magento\Customer\Setup\CustomerSetupFactory;
11-
use Magento\Framework\App\ResourceConnection;
1212
use Magento\Framework\Setup\ModuleDataSetupInterface;
1313
use Magento\Framework\Setup\Patch\DataPatchInterface;
1414
use Magento\Framework\Setup\Patch\PatchVersionInterface;
1515

1616
/**
17-
* Class AddCustomerUpdatedAtAttribute
18-
* @package Magento\Customer\Setup\Patch
17+
* Class add customer updated attribute to customer
1918
*/
2019
class AddCustomerUpdatedAtAttribute implements DataPatchInterface, PatchVersionInterface
2120
{
@@ -30,7 +29,6 @@ class AddCustomerUpdatedAtAttribute implements DataPatchInterface, PatchVersionI
3029
private $customerSetupFactory;
3130

3231
/**
33-
* AddCustomerUpdatedAtAttribute constructor.
3432
* @param ModuleDataSetupInterface $moduleDataSetup
3533
* @param CustomerSetupFactory $customerSetupFactory
3634
*/
@@ -43,7 +41,7 @@ public function __construct(
4341
}
4442

4543
/**
46-
* {@inheritdoc}
44+
* @inheritdoc
4745
*/
4846
public function apply()
4947
{
@@ -61,10 +59,12 @@ public function apply()
6159
'system' => false,
6260
]
6361
);
62+
63+
return $this;
6464
}
6565

6666
/**
67-
* {@inheritdoc}
67+
* @inheritdoc
6868
*/
6969
public static function getDependencies()
7070
{
@@ -74,15 +74,15 @@ public static function getDependencies()
7474
}
7575

7676
/**
77-
* {@inheritdoc}
77+
* @inheritdoc
7878
*/
7979
public static function getVersion()
8080
{
8181
return '2.0.4';
8282
}
8383

8484
/**
85-
* {@inheritdoc}
85+
* @inheritdoc
8686
*/
8787
public function getAliases()
8888
{

app/code/Magento/Customer/Setup/Patch/Data/AddNonSpecifiedGenderAttributeOption.php

Lines changed: 8 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -3,30 +3,18 @@
33
* Copyright © Magento, Inc. All rights reserved.
44
* See COPYING.txt for license details.
55
*/
6+
declare(strict_types=1);
67

78
namespace Magento\Customer\Setup\Patch\Data;
89

910
use Magento\Customer\Model\Customer;
1011
use Magento\Customer\Setup\CustomerSetupFactory;
11-
use Magento\Directory\Model\AllowedCountries;
12-
use Magento\Framework\App\ObjectManager;
13-
use Magento\Framework\Encryption\Encryptor;
14-
use Magento\Framework\Indexer\IndexerRegistry;
15-
use Magento\Framework\Setup\SetupInterface;
16-
use Magento\Framework\Setup\UpgradeDataInterface;
17-
use Magento\Framework\Setup\ModuleContextInterface;
1812
use Magento\Framework\Setup\ModuleDataSetupInterface;
19-
use Magento\Store\Model\ScopeInterface;
20-
use Magento\Store\Model\StoreManagerInterface;
21-
use Magento\Framework\DB\FieldDataConverterFactory;
22-
use Magento\Framework\DB\DataConverter\SerializedToJson;
23-
use Magento\Framework\App\ResourceConnection;
2413
use Magento\Framework\Setup\Patch\DataPatchInterface;
2514
use Magento\Framework\Setup\Patch\PatchVersionInterface;
2615

2716
/**
28-
* Class AddNonSpecifiedGenderAttributeOption
29-
* @package Magento\Customer\Setup\Patch
17+
* Class add non specified gender attribute option to customer
3018
*/
3119
class AddNonSpecifiedGenderAttributeOption implements DataPatchInterface, PatchVersionInterface
3220
{
@@ -41,7 +29,6 @@ class AddNonSpecifiedGenderAttributeOption implements DataPatchInterface, PatchV
4129
private $customerSetupFactory;
4230

4331
/**
44-
* AddNonSpecifiedGenderAttributeOption constructor.
4532
* @param ModuleDataSetupInterface $moduleDataSetup
4633
* @param CustomerSetupFactory $customerSetupFactory
4734
*/
@@ -54,7 +41,7 @@ public function __construct(
5441
}
5542

5643
/**
57-
* {@inheritdoc}
44+
* @inheritdoc
5845
*/
5946
public function apply()
6047
{
@@ -64,10 +51,12 @@ public function apply()
6451

6552
$option = ['attribute_id' => $attributeId, 'values' => [3 => 'Not Specified']];
6653
$customerSetup->addAttributeOption($option);
54+
55+
return $this;
6756
}
6857

6958
/**
70-
* {@inheritdoc}
59+
* @inheritdoc
7160
*/
7261
public static function getDependencies()
7362
{
@@ -77,15 +66,15 @@ public static function getDependencies()
7766
}
7867

7968
/**
80-
* {@inheritdoc}
69+
* @inheritdoc
8170
*/
8271
public static function getVersion()
8372
{
8473
return '2.0.2';
8574
}
8675

8776
/**
88-
* {@inheritdoc}
77+
* @inheritdoc
8978
*/
9079
public function getAliases()
9180
{

app/code/Magento/Customer/Setup/Patch/Data/AddSecurityTrackingAttributes.php

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,19 +3,18 @@
33
* Copyright © Magento, Inc. All rights reserved.
44
* See COPYING.txt for license details.
55
*/
6+
declare(strict_types=1);
67

78
namespace Magento\Customer\Setup\Patch\Data;
89

910
use Magento\Customer\Model\Customer;
1011
use Magento\Customer\Setup\CustomerSetupFactory;
11-
use Magento\Framework\App\ResourceConnection;
1212
use Magento\Framework\Setup\ModuleDataSetupInterface;
1313
use Magento\Framework\Setup\Patch\DataPatchInterface;
1414
use Magento\Framework\Setup\Patch\PatchVersionInterface;
1515

1616
/**
17-
* Class AddSecurityTrackingAttributes
18-
* @package Magento\Customer\Setup\Patch
17+
* Class add security tracking attributes to customer
1918
*/
2019
class AddSecurityTrackingAttributes implements DataPatchInterface, PatchVersionInterface
2120
{
@@ -30,7 +29,6 @@ class AddSecurityTrackingAttributes implements DataPatchInterface, PatchVersionI
3029
private $customerSetupFactory;
3130

3231
/**
33-
* AddSecurityTrackingAttributes constructor.
3432
* @param ModuleDataSetupInterface $moduleDataSetup
3533
* @param CustomerSetupFactory $customerSetupFactory
3634
*/
@@ -43,7 +41,7 @@ public function __construct(
4341
}
4442

4543
/**
46-
* {@inheritdoc}
44+
* @inheritdoc
4745
*/
4846
public function apply()
4947
{
@@ -94,12 +92,14 @@ public function apply()
9492
$this->moduleDataSetup->getConnection()->update(
9593
$configTable,
9694
['value' => new \Zend_Db_Expr('value*24')],
97-
['path = ?' => \Magento\Customer\Model\Customer::XML_PATH_CUSTOMER_RESET_PASSWORD_LINK_EXPIRATION_PERIOD]
95+
['path = ?' => Customer::XML_PATH_CUSTOMER_RESET_PASSWORD_LINK_EXPIRATION_PERIOD]
9896
);
97+
98+
return $this;
9999
}
100100

101101
/**
102-
* {@inheritdoc}
102+
* @inheritdoc
103103
*/
104104
public static function getDependencies()
105105
{
@@ -109,15 +109,15 @@ public static function getDependencies()
109109
}
110110

111111
/**
112-
* {@inheritdoc}
112+
* @inheritdoc
113113
*/
114114
public static function getVersion()
115115
{
116116
return '2.0.7';
117117
}
118118

119119
/**
120-
* {@inheritdoc}
120+
* @inheritdoc
121121
*/
122122
public function getAliases()
123123
{

app/code/Magento/Customer/Setup/Patch/Data/ConvertValidationRulesFromSerializedToJson.php

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,19 +3,18 @@
33
* Copyright © Magento, Inc. All rights reserved.
44
* See COPYING.txt for license details.
55
*/
6+
declare(strict_types=1);
67

78
namespace Magento\Customer\Setup\Patch\Data;
89

910
use Magento\Framework\DB\FieldDataConverterFactory;
1011
use Magento\Framework\DB\DataConverter\SerializedToJson;
11-
use Magento\Framework\App\ResourceConnection;
1212
use Magento\Framework\Setup\ModuleDataSetupInterface;
1313
use Magento\Framework\Setup\Patch\DataPatchInterface;
1414
use Magento\Framework\Setup\Patch\PatchVersionInterface;
1515

1616
/**
17-
* Class ConvertValidationRulesFromSerializedToJson
18-
* @package Magento\Customer\Setup\Patch
17+
* Class convert validation rules from serialized to json for customer
1918
*/
2019
class ConvertValidationRulesFromSerializedToJson implements DataPatchInterface, PatchVersionInterface
2120
{
@@ -30,7 +29,6 @@ class ConvertValidationRulesFromSerializedToJson implements DataPatchInterface,
3029
private $fieldDataConverterFactory;
3130

3231
/**
33-
* ConvertValidationRulesFromSerializedToJson constructor.
3432
* @param ModuleDataSetupInterface $moduleDataSetup
3533
* @param FieldDataConverterFactory $fieldDataConverterFactory
3634
*/
@@ -43,7 +41,7 @@ public function __construct(
4341
}
4442

4543
/**
46-
* {@inheritdoc}
44+
* @inheritdoc
4745
*/
4846
public function apply()
4947
{
@@ -54,10 +52,12 @@ public function apply()
5452
'attribute_id',
5553
'validate_rules'
5654
);
55+
56+
return $this;
5757
}
5858

5959
/**
60-
* {@inheritdoc}
60+
* @inheritdoc
6161
*/
6262
public static function getDependencies()
6363
{
@@ -67,15 +67,15 @@ public static function getDependencies()
6767
}
6868

6969
/**
70-
* {@inheritdoc}
70+
* @inheritdoc
7171
*/
7272
public static function getVersion()
7373
{
7474
return '2.0.11';
7575
}
7676

7777
/**
78-
* {@inheritdoc}
78+
* @inheritdoc
7979
*/
8080
public function getAliases()
8181
{

app/code/Magento/Customer/Setup/Patch/Data/DefaultCustomerGroupsAndAttributes.php

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4,19 +4,20 @@
44
* See COPYING.txt for license details.
55
*/
66

7+
declare(strict_types=1);
8+
79
namespace Magento\Customer\Setup\Patch\Data;
810

911
use Magento\Customer\Setup\CustomerSetup;
1012
use Magento\Customer\Setup\CustomerSetupFactory;
13+
use Magento\Eav\Model\Entity\Attribute\Backend\DefaultBackend;
1114
use Magento\Framework\Module\Setup\Migration;
1215
use Magento\Framework\Setup\ModuleDataSetupInterface;
13-
use Magento\Framework\App\ResourceConnection;
1416
use Magento\Framework\Setup\Patch\DataPatchInterface;
1517
use Magento\Framework\Setup\Patch\PatchVersionInterface;
1618

1719
/**
18-
* Class DefaultCustomerGroupsAndAttributes
19-
* @package Magento\Customer\Setup\Patch
20+
* Class default groups and attributes for customer
2021
*/
2122
class DefaultCustomerGroupsAndAttributes implements DataPatchInterface, PatchVersionInterface
2223
{
@@ -31,20 +32,20 @@ class DefaultCustomerGroupsAndAttributes implements DataPatchInterface, PatchVer
3132
private $moduleDataSetup;
3233

3334
/**
34-
* DefaultCustomerGroupsAndAttributes constructor.
3535
* @param CustomerSetupFactory $customerSetupFactory
3636
* @param ModuleDataSetupInterface $moduleDataSetup
3737
*/
3838
public function __construct(
3939
CustomerSetupFactory $customerSetupFactory,
40-
\Magento\Framework\Setup\ModuleDataSetupInterface $moduleDataSetup
40+
ModuleDataSetupInterface $moduleDataSetup
4141
) {
4242
$this->customerSetupFactory = $customerSetupFactory;
4343
$this->moduleDataSetup = $moduleDataSetup;
4444
}
4545

4646
/**
47-
* {@inheritdoc}
47+
* @inheritdoc
48+
*
4849
* @SuppressWarnings(PHPMD.ExcessiveMethodLength)
4950
*/
5051
public function apply()
@@ -133,7 +134,7 @@ public function apply()
133134
'customer_address',
134135
'street',
135136
'backend_model',
136-
\Magento\Eav\Model\Entity\Attribute\Backend\DefaultBackend::class
137+
DefaultBackend::class
137138
);
138139

139140
$migrationSetup = $this->moduleDataSetup->createMigrationSetup();
@@ -146,26 +147,28 @@ public function apply()
146147
['attribute_id']
147148
);
148149
$migrationSetup->doUpdateClassAliases();
150+
151+
return $this;
149152
}
150153

151154
/**
152-
* {@inheritdoc}
155+
* @inheritdoc
153156
*/
154157
public static function getDependencies()
155158
{
156159
return [];
157160
}
158161

159162
/**
160-
* {@inheritdoc}
163+
* @inheritdoc
161164
*/
162165
public static function getVersion()
163166
{
164167
return '2.0.0';
165168
}
166169

167170
/**
168-
* {@inheritdoc}
171+
* @inheritdoc
169172
*/
170173
public function getAliases()
171174
{

0 commit comments

Comments
 (0)