Skip to content
This repository was archived by the owner on Jan 29, 2020. It is now read-only.

Commit 200f715

Browse files
committed
Migrated ZendModuleProivder to PHP 7
1 parent d6f181d commit 200f715

File tree

1 file changed

+7
-24
lines changed

1 file changed

+7
-24
lines changed

src/ZendModuleProvider.php

Lines changed: 7 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
* @license https://github.com/zendframework/zend-config-aggregator-modulemanager/blob/master/LICENSE.md
66
* New BSD License
77
*/
8-
8+
declare(strict_types=1);
99
namespace Zend\ConfigAggregatorModuleManager;
1010

1111
use InvalidArgumentException;
@@ -44,20 +44,14 @@ public function __construct($module)
4444
$this->module = $module;
4545
}
4646

47-
/**
48-
* @return array
49-
*/
50-
public function __invoke()
47+
public function __invoke(): array
5148
{
5249
return array_replace_recursive($this->getModuleConfig(), [
5350
$this->getDependenciesIdentifier() => $this->getModuleDependencies(),
5451
]);
5552
}
5653

57-
/**
58-
* @return array
59-
*/
60-
private function getModuleDependencies()
54+
private function getModuleDependencies(): array
6155
{
6256
$module = $this->module;
6357
if (! $module instanceof ServiceProviderInterface) {
@@ -67,10 +61,7 @@ private function getModuleDependencies()
6761
return array_replace_recursive($this->dependencies, $this->convert($module->getServiceConfig()));
6862
}
6963

70-
/**
71-
* @return array
72-
*/
73-
private function getModuleConfig()
64+
private function getModuleConfig(): array
7465
{
7566
$module = $this->module;
7667

@@ -95,7 +86,7 @@ private function getModuleConfig()
9586
*
9687
* @return array
9788
*/
98-
private function convert($config)
89+
private function convert($config): array
9990
{
10091
if ($config instanceof Config) {
10192
$config = $config->toArray();
@@ -117,20 +108,12 @@ private function convert($config)
117108
return $config;
118109
}
119110

120-
/**
121-
* @return string
122-
*/
123-
public function getDependenciesIdentifier()
111+
public function getDependenciesIdentifier(): string
124112
{
125113
return $this->dependenciesIdentifier;
126114
}
127115

128-
/**
129-
* @param string $dependenciesIdentifier
130-
*
131-
* @return void
132-
*/
133-
public function setDependenciesIdentifier($dependenciesIdentifier)
116+
public function setDependenciesIdentifier(string $dependenciesIdentifier): void
134117
{
135118
$this->dependenciesIdentifier = (string) $dependenciesIdentifier;
136119
}

0 commit comments

Comments
 (0)