Skip to content

Commit d0ca3ac

Browse files
committed
DecoratorExtension: removed validate()
1 parent f7c94ed commit d0ca3ac

File tree

1 file changed

+1
-10
lines changed

1 file changed

+1
-10
lines changed

src/DI/Extensions/DecoratorExtension.php

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ public function beforeCompile()
2929
{
3030
foreach ($this->getConfig() as $class => $info) {
3131
$info = (array) $info;
32-
$this->validate($info, $this->defaults, $this->prefix($class));
32+
$this->validateConfig($this->defaults, $info, $this->prefix($class));
3333
$info += $this->defaults;
3434
if ($info['inject'] !== NULL) {
3535
$info['tags'][InjectExtension::TAG_INJECT] = $info['inject'];
@@ -61,13 +61,4 @@ public function addTags($type, array $tags)
6161
}
6262
}
6363

64-
65-
private function validate(array $config, array $expected, $name)
66-
{
67-
if ($extra = array_diff_key($config, $expected)) {
68-
$extra = implode(", $name.", array_keys($extra));
69-
throw new Nette\InvalidStateException("Unknown option $name.$extra.");
70-
}
71-
}
72-
7364
}

0 commit comments

Comments
 (0)