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

refactor(Storage): Align all Storage constructors #48614

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

provokateurin
Copy link
Member

Summary

Adds strong types, removes wrong doc blocks and uses the same parameter name everywhere.

Checklist

@provokateurin provokateurin added this to the Nextcloud 31 milestone Oct 8, 2024
Signed-off-by: provokateurin <kate@provokateurin.de>
@provokateurin provokateurin requested review from a team, ArtificialOwl, icewind1991 and artonge and removed request for a team October 14, 2024 05:11
Comment on lines -18 to -21
* @param array $arguments ['storage' => $storage, 'owner' => $owner]
*
* $storage: The storage the permissions mask should be applied on
* $owner: The owner to use in case no owner is found
Copy link
Contributor

Choose a reason for hiding this comment

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

Why remove comments and type indications?

Copy link
Member Author

Choose a reason for hiding this comment

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

If we want to do this right then it needs proper psalm annotations instead of this.
I don't know if this comment is really helpful in the current state.

Copy link
Contributor

Choose a reason for hiding this comment

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

Well, it explains the expected data format, and it's purpose, so I would say it is useful.

Copy link
Member Author

Choose a reason for hiding this comment

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

But we also have the problem that the parameters are passed to the parent class.
So if we limit the types using psalm, then a valid input that is only read by the parent class might get rejected.

Copy link
Contributor

Choose a reason for hiding this comment

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

Is this the case here?

Copy link
Member Author

Choose a reason for hiding this comment

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

I haven't checked, I just wanted to say that it can be a problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants