Skip to content

Commit

Permalink
Merge pull request #24 from praem90/issue-23
Browse files Browse the repository at this point in the history
Fix PHPStan failures
  • Loading branch information
colinodell authored Oct 5, 2023
2 parents 2c623e0 + a0821f6 commit 86f7981
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/Configuration.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
use Dflydev\DotAccessData\DataInterface;
use Dflydev\DotAccessData\Exception\DataException;
use Dflydev\DotAccessData\Exception\InvalidPathException;
use Dflydev\DotAccessData\Exception\MissingPathException;
use League\Config\Exception\UnknownOptionException;
use League\Config\Exception\ValidationException;
use Nette\Schema\Expect;
Expand Down Expand Up @@ -117,7 +116,7 @@ public function get(string $key)
$this->build(self::getTopLevelKey($key));

return $this->cache[$key] = $this->finalConfig->get($key);
} catch (InvalidPathException | MissingPathException $ex) {
} catch (InvalidPathException $ex) {
throw new UnknownOptionException($ex->getMessage(), $key, (int) $ex->getCode(), $ex);
}
}
Expand Down Expand Up @@ -187,10 +186,11 @@ private function build(string $topLevelKey): void
$processor = new Processor();

$processed = $processor->process(Expect::structure([$topLevelKey => $schema]), $userData);
\assert($processed instanceof \stdClass);

$this->raiseAnyDeprecationNotices($processor->getWarnings());

$this->finalConfig->import((array) self::convertStdClassesToArrays($processed));
$this->finalConfig->import(self::convertStdClassesToArrays($processed));
} catch (NetteValidationException $ex) {
throw new ValidationException($ex);
}
Expand Down

0 comments on commit 86f7981

Please sign in to comment.