diff options
author | jld3103 <jld3103yt@gmail.com> | 2023-09-19 06:40:25 +0200 |
---|---|---|
committer | jld3103 <jld3103yt@gmail.com> | 2023-09-19 08:52:46 +0200 |
commit | b7673cd353f13765a5c892d31e3b4e13057a0a3e (patch) | |
tree | df9ba66ef07a21c4c81c5a85ac8a0a2d469f8bcc | |
parent | a5c22fe6f4d7afbd4993777c3f736e93230e9e17 (diff) |
Enable more/less specific errors
Signed-off-by: jld3103 <jld3103yt@gmail.com>
-rw-r--r-- | psalm-baseline.xml | 12 | ||||
-rw-r--r-- | psalm.xml | 6 |
2 files changed, 18 insertions, 0 deletions
diff --git a/psalm-baseline.xml b/psalm-baseline.xml index e5a5c9212..c585dd05e 100644 --- a/psalm-baseline.xml +++ b/psalm-baseline.xml @@ -1401,6 +1401,12 @@ <InvalidArgument> <code>$exception</code> </InvalidArgument> + <LessSpecificReturnStatement> + <code><![CDATA[new self($exception->getMessage(), $exception->getCode(), $exception)]]></code> + </LessSpecificReturnStatement> + <MoreSpecificReturnType> + <code>ServiceException</code> + </MoreSpecificReturnType> <PossiblyUnusedMethod> <code>from</code> </PossiblyUnusedMethod> @@ -1413,6 +1419,12 @@ <InvalidArgument> <code>$exception</code> </InvalidArgument> + <LessSpecificReturnStatement> + <code><![CDATA[new self($exception->getMessage(), $exception->getCode(), $exception)]]></code> + </LessSpecificReturnStatement> + <MoreSpecificReturnType> + <code>ServiceException</code> + </MoreSpecificReturnType> <PossiblyUnusedMethod> <code>from</code> </PossiblyUnusedMethod> @@ -15,4 +15,10 @@ <directory name="vendor" /> </ignoreFiles> </projectFiles> + <issueHandlers> + <LessSpecificReturnStatement errorLevel="error" /> + <LessSpecificReturnType errorLevel="error" /> + <LessSpecificImplementedReturnType errorLevel="error" /> + <MoreSpecificReturnType errorLevel="error" /> + </issueHandlers> </psalm> |