-
-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Errors: PHPStan: src/Configuration.php#L120 Dead catch - Dflydev\DotAccessData\Exception\MissingPathException is never thrown in the try block. PHPStan: src/Configuration.php#L193 Parameter 1 $data of method Dflydev\DotAccessData\Data::import() expects array<string, mixed>, array given.
- Loading branch information
Showing
1 changed file
with
7 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -117,8 +117,12 @@ public function get(string $key) | |
$this->build(self::getTopLevelKey($key)); | ||
|
||
return $this->cache[$key] = $this->finalConfig->get($key); | ||
} catch (InvalidPathException | MissingPathException $ex) { | ||
throw new UnknownOptionException($ex->getMessage(), $key, (int) $ex->getCode(), $ex); | ||
} catch (\Exception $ex) { | ||
if ($ex instanceof InvalidPathException || $ex instanceof MissingPathException) { | ||
throw new UnknownOptionException($ex->getMessage(), $key, (int) $ex->getCode(), $ex); | ||
} | ||
|
||
throw $ex; | ||
Check failure on line 125 in src/Configuration.php GitHub Actions / PHPStan
|
||
} | ||
} | ||
|
||
|
@@ -186,6 +190,7 @@ private function build(string $topLevelKey): void | |
$schema = $this->configSchemas[$topLevelKey]; | ||
$processor = new Processor(); | ||
|
||
/** @var \StdClass $processed */ | ||
$processed = $processor->process(Expect::structure([$topLevelKey => $schema]), $userData); | ||
|
||
$this->raiseAnyDeprecationNotices($processor->getWarnings()); | ||
|