5
5
* @license https://github.com/zendframework/zend-config-aggregator-modulemanager/blob/master/LICENSE.md
6
6
* New BSD License
7
7
*/
8
-
8
+ declare (strict_types= 1 );
9
9
namespace Zend \ConfigAggregatorModuleManager ;
10
10
11
11
use InvalidArgumentException ;
@@ -44,20 +44,14 @@ public function __construct($module)
44
44
$ this ->module = $ module ;
45
45
}
46
46
47
- /**
48
- * @return array
49
- */
50
- public function __invoke ()
47
+ public function __invoke (): array
51
48
{
52
49
return array_replace_recursive ($ this ->getModuleConfig (), [
53
50
$ this ->getDependenciesIdentifier () => $ this ->getModuleDependencies (),
54
51
]);
55
52
}
56
53
57
- /**
58
- * @return array
59
- */
60
- private function getModuleDependencies ()
54
+ private function getModuleDependencies (): array
61
55
{
62
56
$ module = $ this ->module ;
63
57
if (! $ module instanceof ServiceProviderInterface) {
@@ -67,10 +61,7 @@ private function getModuleDependencies()
67
61
return array_replace_recursive ($ this ->dependencies , $ this ->convert ($ module ->getServiceConfig ()));
68
62
}
69
63
70
- /**
71
- * @return array
72
- */
73
- private function getModuleConfig ()
64
+ private function getModuleConfig (): array
74
65
{
75
66
$ module = $ this ->module ;
76
67
@@ -95,7 +86,7 @@ private function getModuleConfig()
95
86
*
96
87
* @return array
97
88
*/
98
- private function convert ($ config )
89
+ private function convert ($ config ): array
99
90
{
100
91
if ($ config instanceof Config) {
101
92
$ config = $ config ->toArray ();
@@ -117,20 +108,12 @@ private function convert($config)
117
108
return $ config ;
118
109
}
119
110
120
- /**
121
- * @return string
122
- */
123
- public function getDependenciesIdentifier ()
111
+ public function getDependenciesIdentifier (): string
124
112
{
125
113
return $ this ->dependenciesIdentifier ;
126
114
}
127
115
128
- /**
129
- * @param string $dependenciesIdentifier
130
- *
131
- * @return void
132
- */
133
- public function setDependenciesIdentifier ($ dependenciesIdentifier )
116
+ public function setDependenciesIdentifier (string $ dependenciesIdentifier ): void
134
117
{
135
118
$ this ->dependenciesIdentifier = (string ) $ dependenciesIdentifier ;
136
119
}
0 commit comments