Skip to content

Commit e5ab51f

Browse files
committed
removed unused imports
1 parent 8513dfd commit e5ab51f

12 files changed

+68
-94
lines changed

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

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,18 +4,18 @@
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\Model\Customer;
1012
use Magento\Customer\Setup\CustomerSetupFactory;
11-
use Magento\Framework\App\ResourceConnection;
1213
use Magento\Framework\Setup\ModuleDataSetupInterface;
1314
use Magento\Framework\Setup\Patch\DataPatchInterface;
1415
use Magento\Framework\Setup\Patch\PatchVersionInterface;
1516

1617
/**
17-
* Class AddCustomerUpdatedAtAttribute
18-
* @package Magento\Customer\Setup\Patch
18+
* Class add customer updated attribute to customer
1919
*/
2020
class AddCustomerUpdatedAtAttribute implements DataPatchInterface, PatchVersionInterface
2121
{
@@ -30,7 +30,6 @@ class AddCustomerUpdatedAtAttribute implements DataPatchInterface, PatchVersionI
3030
private $customerSetupFactory;
3131

3232
/**
33-
* AddCustomerUpdatedAtAttribute constructor.
3433
* @param ModuleDataSetupInterface $moduleDataSetup
3534
* @param CustomerSetupFactory $customerSetupFactory
3635
*/

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

Lines changed: 3 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -4,29 +4,18 @@
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\Model\Customer;
1012
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;
1813
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;
2414
use Magento\Framework\Setup\Patch\DataPatchInterface;
2515
use Magento\Framework\Setup\Patch\PatchVersionInterface;
2616

2717
/**
28-
* Class AddNonSpecifiedGenderAttributeOption
29-
* @package Magento\Customer\Setup\Patch
18+
* Class add non specified gender attribute option to customer
3019
*/
3120
class AddNonSpecifiedGenderAttributeOption implements DataPatchInterface, PatchVersionInterface
3221
{
@@ -41,7 +30,6 @@ class AddNonSpecifiedGenderAttributeOption implements DataPatchInterface, PatchV
4130
private $customerSetupFactory;
4231

4332
/**
44-
* AddNonSpecifiedGenderAttributeOption constructor.
4533
* @param ModuleDataSetupInterface $moduleDataSetup
4634
* @param CustomerSetupFactory $customerSetupFactory
4735
*/

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

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,18 +4,18 @@
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\Model\Customer;
1012
use Magento\Customer\Setup\CustomerSetupFactory;
11-
use Magento\Framework\App\ResourceConnection;
1213
use Magento\Framework\Setup\ModuleDataSetupInterface;
1314
use Magento\Framework\Setup\Patch\DataPatchInterface;
1415
use Magento\Framework\Setup\Patch\PatchVersionInterface;
1516

1617
/**
17-
* Class AddSecurityTrackingAttributes
18-
* @package Magento\Customer\Setup\Patch
18+
* Class add security tracking attributes to customer
1919
*/
2020
class AddSecurityTrackingAttributes implements DataPatchInterface, PatchVersionInterface
2121
{
@@ -30,7 +30,6 @@ class AddSecurityTrackingAttributes implements DataPatchInterface, PatchVersionI
3030
private $customerSetupFactory;
3131

3232
/**
33-
* AddSecurityTrackingAttributes constructor.
3433
* @param ModuleDataSetupInterface $moduleDataSetup
3534
* @param CustomerSetupFactory $customerSetupFactory
3635
*/

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

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,18 +4,18 @@
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\Framework\DB\FieldDataConverterFactory;
1012
use Magento\Framework\DB\DataConverter\SerializedToJson;
11-
use Magento\Framework\App\ResourceConnection;
1213
use Magento\Framework\Setup\ModuleDataSetupInterface;
1314
use Magento\Framework\Setup\Patch\DataPatchInterface;
1415
use Magento\Framework\Setup\Patch\PatchVersionInterface;
1516

1617
/**
17-
* Class ConvertValidationRulesFromSerializedToJson
18-
* @package Magento\Customer\Setup\Patch
18+
* Class convert validation rules from serialized to json for customer
1919
*/
2020
class ConvertValidationRulesFromSerializedToJson implements DataPatchInterface, PatchVersionInterface
2121
{
@@ -30,7 +30,6 @@ class ConvertValidationRulesFromSerializedToJson implements DataPatchInterface,
3030
private $fieldDataConverterFactory;
3131

3232
/**
33-
* ConvertValidationRulesFromSerializedToJson constructor.
3433
* @param ModuleDataSetupInterface $moduleDataSetup
3534
* @param FieldDataConverterFactory $fieldDataConverterFactory
3635
*/

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

Lines changed: 6 additions & 6 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,13 +32,12 @@ 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;
@@ -133,7 +133,7 @@ public function apply()
133133
'customer_address',
134134
'street',
135135
'backend_model',
136-
\Magento\Eav\Model\Entity\Attribute\Backend\DefaultBackend::class
136+
DefaultBackend::class
137137
);
138138

139139
$migrationSetup = $this->moduleDataSetup->createMigrationSetup();

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

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

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

11+
use Exception;
912
use Magento\Directory\Model\AllowedCountries;
1013
use Magento\Framework\Setup\ModuleDataSetupInterface;
1114
use Magento\Store\Model\ScopeInterface;
@@ -34,15 +37,14 @@ class MigrateStoresAllowedCountriesToWebsite implements DataPatchInterface, Patc
3437
private $allowedCountries;
3538

3639
/**
37-
* MigrateStoresAllowedCountriesToWebsite constructor.
3840
* @param ModuleDataSetupInterface $moduleDataSetup
3941
* @param StoreManagerInterface $storeManager
4042
* @param AllowedCountries $allowedCountries
4143
*/
4244
public function __construct(
4345
ModuleDataSetupInterface $moduleDataSetup,
44-
\Magento\Store\Model\StoreManagerInterface $storeManager,
45-
\Magento\Directory\Model\AllowedCountries $allowedCountries
46+
StoreManagerInterface $storeManager,
47+
AllowedCountries $allowedCountries
4648
) {
4749
$this->moduleDataSetup = $moduleDataSetup;
4850
$this->storeManager = $storeManager;
@@ -51,6 +53,7 @@ public function __construct(
5153

5254
/**
5355
* @inheritdoc
56+
* @throws Exception
5457
*/
5558
public function apply()
5659
{
@@ -60,7 +63,7 @@ public function apply()
6063
try {
6164
$this->migrateStoresAllowedCountriesToWebsite();
6265
$this->moduleDataSetup->getConnection()->commit();
63-
} catch (\Exception $e) {
66+
} catch (Exception $e) {
6467
$this->moduleDataSetup->getConnection()->rollBack();
6568
throw $e;
6669
}

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

Lines changed: 18 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -4,29 +4,23 @@
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\Model\Customer;
12+
use Magento\Customer\Model\ResourceModel\Address;
13+
use Magento\Customer\Model\ResourceModel\Address\Attribute\Backend\Region;
14+
use Magento\Customer\Model\ResourceModel\Address\Attribute\Source\Country;
15+
use Magento\Customer\Model\ResourceModel\Attribute\Collection;
1016
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;
17+
use Magento\Eav\Model\Entity\Increment\NumericValue;
1818
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;
2419
use Magento\Framework\Setup\Patch\DataPatchInterface;
2520
use Magento\Framework\Setup\Patch\PatchVersionInterface;
2621

2722
/**
28-
* Class RemoveCheckoutRegisterAndUpdateAttributes
29-
* @package Magento\Customer\Setup\Patch
23+
* Remove register and update attributes for checkout
3024
*/
3125
class RemoveCheckoutRegisterAndUpdateAttributes implements DataPatchInterface, PatchVersionInterface
3226
{
@@ -41,7 +35,6 @@ class RemoveCheckoutRegisterAndUpdateAttributes implements DataPatchInterface, P
4135
private $customerSetupFactory;
4236

4337
/**
44-
* RemoveCheckoutRegisterAndUpdateAttributes constructor.
4538
* @param ModuleDataSetupInterface $moduleDataSetup
4639
* @param CustomerSetupFactory $customerSetupFactory
4740
*/
@@ -64,47 +57,47 @@ public function apply()
6457
);
6558
$customerSetup = $this->customerSetupFactory->create(['setup' => $this->moduleDataSetup]);
6659
$customerSetup->updateEntityType(
67-
\Magento\Customer\Model\Customer::ENTITY,
60+
Customer::ENTITY,
6861
'entity_model',
6962
\Magento\Customer\Model\ResourceModel\Customer::class
7063
);
7164
$customerSetup->updateEntityType(
72-
\Magento\Customer\Model\Customer::ENTITY,
65+
Customer::ENTITY,
7366
'increment_model',
74-
\Magento\Eav\Model\Entity\Increment\NumericValue::class
67+
NumericValue::class
7568
);
7669
$customerSetup->updateEntityType(
77-
\Magento\Customer\Model\Customer::ENTITY,
70+
Customer::ENTITY,
7871
'entity_attribute_collection',
79-
\Magento\Customer\Model\ResourceModel\Attribute\Collection::class
72+
Collection::class
8073
);
8174
$customerSetup->updateEntityType(
8275
'customer_address',
8376
'entity_model',
84-
\Magento\Customer\Model\ResourceModel\Address::class
77+
Address::class
8578
);
8679
$customerSetup->updateEntityType(
8780
'customer_address',
8881
'entity_attribute_collection',
89-
\Magento\Customer\Model\ResourceModel\Address\Attribute\Collection::class
82+
Address\Attribute\Collection::class
9083
);
9184
$customerSetup->updateAttribute(
9285
'customer_address',
9386
'country_id',
9487
'source_model',
95-
\Magento\Customer\Model\ResourceModel\Address\Attribute\Source\Country::class
88+
Country::class
9689
);
9790
$customerSetup->updateAttribute(
9891
'customer_address',
9992
'region',
10093
'backend_model',
101-
\Magento\Customer\Model\ResourceModel\Address\Attribute\Backend\Region::class
94+
Region::class
10295
);
10396
$customerSetup->updateAttribute(
10497
'customer_address',
10598
'region_id',
10699
'source_model',
107-
\Magento\Customer\Model\ResourceModel\Address\Attribute\Source\Region::class
100+
Address\Attribute\Source\Region::class
108101
);
109102
}
110103

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

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

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

9-
use Magento\Framework\App\ResourceConnection;
11+
use Magento\Customer\Model\Form;
1012
use Magento\Framework\Setup\ModuleDataSetupInterface;
1113
use Magento\Framework\Setup\Patch\DataPatchInterface;
1214
use Magento\Framework\Setup\Patch\PatchVersionInterface;
1315

1416
/**
15-
* Class UpdateAutocompleteOnStorefrontCOnfigPath
16-
* @package Magento\Customer\Setup\Patch
17+
* Update storefront's autocomplete of config path
1718
*/
1819
class UpdateAutocompleteOnStorefrontConfigPath implements DataPatchInterface, PatchVersionInterface
1920
{
@@ -23,7 +24,6 @@ class UpdateAutocompleteOnStorefrontConfigPath implements DataPatchInterface, Pa
2324
private $moduleDataSetup;
2425

2526
/**
26-
* UpdateAutocompleteOnStorefrontCOnfigPath constructor.
2727
* @param ModuleDataSetupInterface $moduleDataSetup
2828
*/
2929
public function __construct(
@@ -39,7 +39,7 @@ public function apply()
3939
{
4040
$this->moduleDataSetup->getConnection()->update(
4141
$this->moduleDataSetup->getTable('core_config_data'),
42-
['path' => \Magento\Customer\Model\Form::XML_PATH_ENABLE_AUTOCOMPLETE],
42+
['path' => Form::XML_PATH_ENABLE_AUTOCOMPLETE],
4343
['path = ?' => 'general/restriction/autocomplete_on_storefront']
4444
);
4545
}

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

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,17 +4,17 @@
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\CustomerSetupFactory;
10-
use Magento\Framework\App\ResourceConnection;
1112
use Magento\Framework\Setup\ModuleDataSetupInterface;
1213
use Magento\Framework\Setup\Patch\DataPatchInterface;
1314
use Magento\Framework\Setup\Patch\PatchVersionInterface;
1415

1516
/**
16-
* Class UpdateCustomerAttributeInputFilters
17-
* @package Magento\Customer\Setup\Patch
17+
* Update attribute input filters for customer
1818
*/
1919
class UpdateCustomerAttributeInputFilters implements DataPatchInterface, PatchVersionInterface
2020
{
@@ -29,7 +29,6 @@ class UpdateCustomerAttributeInputFilters implements DataPatchInterface, PatchVe
2929
private $customerSetupFactory;
3030

3131
/**
32-
* UpdateCustomerAttributeInputFilters constructor.
3332
* @param ModuleDataSetupInterface $moduleDataSetup
3433
* @param CustomerSetupFactory $customerSetupFactory
3534
*/

0 commit comments

Comments
 (0)