1
0
mirror of https://github.com/danog/psalm.git synced 2024-11-26 20:34:47 +01:00

Throw exception before notice is emitted

This commit is contained in:
Matthew Brown 2018-12-05 09:33:13 -05:00
parent 93662abf8d
commit 830ee873dc
2 changed files with 5 additions and 1 deletions

View File

@ -1,5 +1,5 @@
<?xml version="1.0"?>
<psalm xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="https://getpsalm.org/schema/config" name="Psalm for Psalm" useDocblockTypes="true" totallyTyped="true" strictBinaryOperands="false" rememberPropertyAssignmentsAfterCall="true" checkForThrowsDocblock="false" throwExceptionOnError="1" xsi:schemaLocation="https://getpsalm.org/schema/config config.xsd">
<psalm xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="https://getpsalm.org/schema/config" name="Psalm for Psalm" useDocblockTypes="true" totallyTyped="true" strictBinaryOperands="false" rememberPropertyAssignmentsAfterCall="true" checkForThrowsDocblock="false" throwExceptionOnError="0" xsi:schemaLocation="https://getpsalm.org/schema/config config.xsd">
<projectFiles>
<directory name="src"/>
<directory name="tests"/>

View File

@ -2084,6 +2084,10 @@ class Reconciler
}
}
if (!isset($existing_keys[$base_key])) {
throw new \UnexpectedValueException($base_key . ' should exist in list of keys');
}
return $existing_keys[$base_key];
}
}