Skip to content

Commit

Permalink
ApplicationExtension: fixed schema [Closes #213]
Browse files Browse the repository at this point in the history
  • Loading branch information
dg committed Apr 1, 2019
1 parent 0f0c24c commit 5a520b1
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/Bridges/ApplicationDI/ApplicationExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
use Composer\Autoload\ClassLoader;
use Nette;
use Nette\Application\UI;
use Nette\DI\Config\Expect;
use Nette\DI\Definitions;
use Nette\Schema\Expect;
use Tracy;


Expand Down Expand Up @@ -43,14 +43,14 @@ public function __construct(bool $debugMode = false, array $scanDirs = null, str
}


public function getConfigSchema(): Nette\DI\Config\Schema
public function getConfigSchema(): Nette\Schema\Schema
{
return Expect::structure([
'debugger' => Expect::bool(interface_exists(Tracy\IBarPanel::class)),
'errorPresenter' => Expect::string('Nette:Error')->dynamic(),
'catchExceptions' => Expect::bool(!$this->debugMode)->dynamic(),
'mapping' => Expect::arrayOf('string')->dynamic(),
'scanDirs' => Expect::enum(Expect::arrayOf('string')->default($this->scanDirs), false),
'mapping' => Expect::arrayOf('string|array'),
'scanDirs' => Expect::anyOf(Expect::arrayOf('string'), false)->default($this->scanDirs),
'scanComposer' => Expect::bool(class_exists(ClassLoader::class)),
'scanFilter' => Expect::string('Presenter'),
'silentLinks' => Expect::bool(),
Expand Down

0 comments on commit 5a520b1

Please sign in to comment.