Skip to content
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

add psalm return type to SimpleContainer::get using templates #28772

Closed
wants to merge 1 commit into from

Conversation

icewind1991
Copy link
Member

this way psalm (and phpstorm) know what \OC::$server->get(...) returns

Signed-off-by: Robin Appelman robin@icewind.nl

this way psalm (and phpstorm) know what `\OC::->get(...)` returns

Signed-off-by: Robin Appelman <robin@icewind.nl>
@icewind1991 icewind1991 added the 3. to review Waiting for reviews label Sep 9, 2021
@icewind1991 icewind1991 added this to the Nextcloud 23 milestone Sep 9, 2021
/**
* @template T
* @psalm-param class-string<T> $id
* @psalm-return T
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we also make it work with parameters like we did for

* @psalm-return ($name is class-string ? T : mixed)
? As in, only specify that it will return an instance of T if $id is a class-string

@skjnldsv skjnldsv mentioned this pull request Oct 13, 2021
@skjnldsv skjnldsv added the bug label Oct 22, 2021
@skjnldsv
Copy link
Member

Status here?

@skjnldsv skjnldsv added 2. developing Work in progress and removed 3. to review Waiting for reviews labels Oct 22, 2021
This was referenced Oct 25, 2021
@skjnldsv skjnldsv modified the milestones: Nextcloud 23, Nextcloud 24 Nov 1, 2021
@skjnldsv skjnldsv mentioned this pull request Mar 24, 2022
@blizzz blizzz mentioned this pull request Mar 31, 2022
This was referenced Apr 7, 2022
@blizzz blizzz modified the milestones: Nextcloud 24, Nextcloud 25 Apr 21, 2022
This was referenced Aug 12, 2022
This was referenced Aug 24, 2022
This was referenced Sep 6, 2022
@skjnldsv skjnldsv mentioned this pull request Sep 15, 2022
This was referenced Sep 20, 2022
@blizzz blizzz modified the milestones: Nextcloud 25, Nextcloud 26 Sep 22, 2022
@blizzz blizzz mentioned this pull request Feb 1, 2023
@skjnldsv skjnldsv mentioned this pull request Feb 23, 2023
@blizzz blizzz mentioned this pull request Mar 7, 2023
@blizzz blizzz modified the milestones: Nextcloud 26, Nextcloud 27 Mar 9, 2023
This was referenced May 3, 2023
@skjnldsv skjnldsv modified the milestones: Nextcloud 27, Nextcloud 28 May 9, 2023
@skjnldsv skjnldsv mentioned this pull request Nov 1, 2023
This was referenced Nov 6, 2023
This was referenced Nov 14, 2023
@blizzz blizzz modified the milestones: Nextcloud 28, Nextcloud 29 Nov 23, 2023
@icewind1991 icewind1991 closed this Mar 6, 2024
@ChristophWurst ChristophWurst deleted the container-get-template branch March 6, 2024 18:38
@skjnldsv skjnldsv removed this from the Nextcloud 29 milestone Aug 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
2. developing Work in progress bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants