Skip to content

Commit

Permalink
EventBridgesExtension: remove useless default values
Browse files Browse the repository at this point in the history
  • Loading branch information
mabar committed Oct 31, 2019
1 parent 945489b commit 9417598
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions src/DI/EventBridgesExtension.php
Expand Up @@ -16,9 +16,9 @@ class EventBridgesExtension extends CompilerExtension
public function getConfigSchema(): Schema
{
return Expect::structure([
'application' => Expect::anyOf(false)->default([]),
'latte' => Expect::anyOf(false)->default([]),
'security' => Expect::anyOf(false)->default([]),
'application' => Expect::anyOf(false),
'latte' => Expect::anyOf(false),
'security' => Expect::anyOf(false),
])->castTo('array');
}

Expand Down Expand Up @@ -48,6 +48,11 @@ public function loadConfiguration(): void
$this->passes[$bridge] = new $this->map[$bridge]();
$this->passes[$bridge]->setCompiler($this->compiler, $this->prefix($bridge));
$this->passes[$bridge]->setConfig($bridgeConfig);

if ($bridgeConfig !== null) {
$this->passes[$bridge]->setConfig($bridgeConfig);
}

$this->passes[$bridge]->loadConfiguration();
}
}
Expand Down

0 comments on commit 9417598

Please sign in to comment.