Skip to content

Commit 973bc5a

Browse files
committed
Extension: simplify helperSet schema
1 parent 3727530 commit 973bc5a

1 file changed

Lines changed: 1 addition & 9 deletions

File tree

src/DI/ConsoleExtension.php

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616
use Nette\Http\UrlScript;
1717
use Nette\Schema\Expect;
1818
use Nette\Schema\Schema;
19-
use Nette\Schema\ValidationException;
2019
use Nette\Utils\Arrays;
2120
use stdClass;
2221
use Symfony\Component\Console\Command\Command;
@@ -51,14 +50,7 @@ public function getConfigSchema(): Schema
5150
'version' => Expect::anyOf(Expect::string(), Expect::int(), Expect::float()),
5251
'catchExceptions' => Expect::bool(),
5352
'autoExit' => Expect::bool(),
54-
'helperSet' => Expect::anyOf(Expect::string(), Expect::type(Statement::class))
55-
->assert(function ($helperSet): bool {
56-
if ($helperSet === null) {
57-
throw new ValidationException('helperSet cannot be null');
58-
}
59-
60-
return true;
61-
}),
53+
'helperSet' => Expect::anyOf(Expect::string(), Expect::type(Statement::class)),
6254
'helpers' => Expect::arrayOf(
6355
Expect::anyOf(Expect::string(), Expect::array(), Expect::type(Statement::class))
6456
),

0 commit comments

Comments
 (0)