9
9
namespace Magento \Directory \Setup \Patch \Data ;
10
10
11
11
use Magento \Directory \Setup \DataInstaller ;
12
+ use Magento \Directory \Setup \DataInstallerFactory ;
12
13
use Magento \Framework \Setup \ModuleDataSetupInterface ;
13
14
use Magento \Framework \Setup \Patch \DataPatchInterface ;
14
15
15
16
/**
16
- * Class AddDataForUruguay
17
+ * Add Uruguay States/Regions
17
18
*/
18
19
class AddDataForUruguay implements DataPatchInterface
19
20
{
@@ -23,24 +24,24 @@ class AddDataForUruguay implements DataPatchInterface
23
24
private $ moduleDataSetup ;
24
25
25
26
/**
26
- * @var \Magento\Directory\Setup\ DataInstallerFactory
27
+ * @var DataInstallerFactory
27
28
*/
28
29
private $ dataInstallerFactory ;
29
30
30
31
/**
31
32
* @param ModuleDataSetupInterface $moduleDataSetup
32
- * @param \Magento\Directory\Setup\ DataInstallerFactory $dataInstallerFactory
33
+ * @param DataInstallerFactory $dataInstallerFactory
33
34
*/
34
35
public function __construct (
35
36
ModuleDataSetupInterface $ moduleDataSetup ,
36
- \ Magento \ Directory \ Setup \ DataInstallerFactory $ dataInstallerFactory
37
+ DataInstallerFactory $ dataInstallerFactory
37
38
) {
38
39
$ this ->moduleDataSetup = $ moduleDataSetup ;
39
40
$ this ->dataInstallerFactory = $ dataInstallerFactory ;
40
41
}
41
42
42
43
/**
43
- * @inheritdoc
44
+ * @return $this|AddDataForUruguay
44
45
*/
45
46
public function apply ()
46
47
{
@@ -50,14 +51,16 @@ public function apply()
50
51
$ this ->moduleDataSetup ->getConnection (),
51
52
$ this ->getDataForUruguay ()
52
53
);
54
+
55
+ return $ this ;
53
56
}
54
57
55
58
/**
56
59
* Uruguay states data.
57
60
*
58
61
* @return array
59
62
*/
60
- private function getDataForUruguay ()
63
+ private function getDataForUruguay (): array
61
64
{
62
65
return [
63
66
['UY ' , 'UY-AR ' , 'Artigas ' ],
@@ -84,8 +87,9 @@ private function getDataForUruguay()
84
87
85
88
/**
86
89
* @inheritdoc
90
+ * @return array
87
91
*/
88
- public static function getDependencies ()
92
+ public static function getDependencies (): array
89
93
{
90
94
return [
91
95
InitializeDirectoryData::class,
@@ -94,8 +98,9 @@ public static function getDependencies()
94
98
95
99
/**
96
100
* @inheritdoc
101
+ * @return array
97
102
*/
98
- public function getAliases ()
103
+ public function getAliases (): array
99
104
{
100
105
return [];
101
106
}
0 commit comments