Skip to content
This repository was archived by the owner on May 1, 2019. It is now read-only.

Commit c8fe41e

Browse files
committed
Fix: Flatten config array
1 parent 06a8bec commit c8fe41e

4 files changed

Lines changed: 6 additions & 10 deletions

File tree

module/Application/config/module.config.php

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,8 @@
77

88
return [
99
'github_repository' => [
10-
'repository' => [
11-
'owner' => 'zendframework',
12-
'name' => 'modules.zendframework.com',
13-
],
10+
'owner' => 'zendframework',
11+
'name' => 'modules.zendframework.com',
1412
],
1513
'router' => [
1614
'routes' => [

module/Application/src/Application/Controller/ContributorsControllerFactory.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ public function createService(ServiceLocatorInterface $controllerManager)
2121
/* @var Service\RepositoryRetriever $repositoryRetriever */
2222
$repositoryRetriever = $serviceManager->get(Service\RepositoryRetriever::class);
2323

24-
$repositoryData = $serviceManager->get('Config')['github_repository']['repository'];
24+
$repositoryData = $serviceManager->get('Config')['github_repository'];
2525

2626
return new ContributorsController(
2727
$repositoryRetriever,

module/Application/src/Application/View/Helper/GitHubRepositoryUrlFactory.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ public function createService(ServiceLocatorInterface $serviceLocator)
1818
/* @var HelperPluginManager $serviceLocator */
1919
$serviceManager = $serviceLocator->getServiceLocator();
2020

21-
$config = $serviceManager->get('Config')['github_repository']['repository'];
21+
$config = $serviceManager->get('Config')['github_repository'];
2222

2323
return new GitHubRepositoryUrl(
2424
$config['owner'],

module/Application/test/ApplicationTest/Integration/Controller/ContributorsControllerTest.php

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,8 @@ public function testContributorsActionCanBeAccessed()
2626
$config = $this->getApplicationServiceLocator()->get('Config');
2727

2828
$config['github_repository'] = [
29-
'repository' => [
30-
'owner' => $vendor,
31-
'name' => $name,
32-
],
29+
'owner' => $vendor,
30+
'name' => $name,
3331
];
3432

3533
$repositoryRetriever = $this->getMockBuilder(Service\RepositoryRetriever::class)

0 commit comments

Comments
 (0)