-
-
Notifications
You must be signed in to change notification settings - Fork 4k
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 parameter type hints to parameters #48195
base: master
Are you sure you want to change the base?
Conversation
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.
👍 except for the structures that are possibly implemented/extended by apps
@@ -26,5 +26,5 @@ interface IProvider { | |||
* when they did not handle the event. Throwing \InvalidArgumentException directly is deprecated and will | |||
* be logged as an error in Nextcloud 39. | |||
*/ | |||
public function parse($language, IEvent $event, ?IEvent $previousEvent = null); | |||
public function parse(string $language, IEvent $event, ?IEvent $previousEvent = null); |
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.
Possibly implemented by apps
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.
but its an interface, so it can be stronger than an implementation
* @since 7.0.0 | ||
*/ | ||
public function __construct($msg) { | ||
public function __construct(string $msg) { |
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.
Possibly extended by an app
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.
Same for AppFramework/ApiController.php
and many more …
I thought it's only for the parameters, but yeah when it's not an interface but a class, we need to do it the other way around
Signed-off-by: Joas Schilling <[email protected]>
fe23079
to
e271318
Compare
Summary
TODO
Checklist