-
Notifications
You must be signed in to change notification settings - Fork 25
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chore: Add psalm for code analysis #911
Conversation
9a745a9
to
1976c21
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks a lot
@@ -148,7 +148,7 @@ public function load(int $id): Estimator { | |||
} | |||
|
|||
/** | |||
* @param Estimator|Persistable $estimator | |||
* @param Estimator $estimator (Must implement Persistable) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what about Estimator&Persistable? https://psalm.dev/docs/annotating_code/type_syntax/intersection_types/
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can be done in a follow up, but this causes many issues as all functions also need to return the correct type.
1976c21
to
bb29721
Compare
8f7cf51
to
8a04581
Compare
This needs to be removed from the expected checks - it does not exist as we can only check 8.1+ |
00cda81
to
14dbeae
Compare
Fix all detected problem. There should be no¹ change in logic or behavior. ¹ Well one exception: If a suspicious login could not be persisted the code threw at some random place, so instead we handle this by notify the user and log that as critical severity. Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
14dbeae
to
6287e23
Compare
Fixes #705
Fix all detected problem.
There should be no¹ change in logic or behavior.
¹ Well one exception: If a suspicious login could not be persisted the code threw at some random place, so instead we handle this by notify the user and log that as critical severity.