Skip to content

Comments

refactor(psalm): Fully type IStorageFactory#58463

Open
CarlSchwan wants to merge 1 commit intomasterfrom
carl/psalm-storagefactory
Open

refactor(psalm): Fully type IStorageFactory#58463
CarlSchwan wants to merge 1 commit intomasterfrom
carl/psalm-storagefactory

Conversation

@CarlSchwan
Copy link
Member

Summary

TODO

  • ...

Checklist

@CarlSchwan CarlSchwan self-assigned this Feb 20, 2026
@CarlSchwan CarlSchwan requested a review from a team as a code owner February 20, 2026 14:24
@CarlSchwan CarlSchwan added 3. to review Waiting for reviews ♻️ refactor Refactor code (not a bug fix, not a feature just refactoring) labels Feb 20, 2026
@CarlSchwan CarlSchwan requested review from ArtificialOwl, icewind1991 and leftybournes and removed request for a team February 20, 2026 14:24
@CarlSchwan CarlSchwan added this to the Nextcloud 34 milestone Feb 20, 2026
@CarlSchwan CarlSchwan force-pushed the carl/psalm-storagefactory branch from 8e859ec to 623b249 Compare February 20, 2026 16:35
Copy link
Member

@provokateurin provokateurin left a comment

Choose a reason for hiding this comment

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

Please add all files to psalm:strict and rector:strict.

Signed-off-by: Carl Schwan <carlschwan@kde.org>
@CarlSchwan CarlSchwan force-pushed the carl/psalm-storagefactory branch from 623b249 to 7db5646 Compare February 23, 2026 17:00
@CarlSchwan
Copy link
Member Author

Please add all files to psalm:strict and rector:strict.

psalm strict really disliked the usort call for some reasons

ERROR: MixedInferredReturnType - lib/private/Files/Storage/StorageFactory.php:60:52 - Could not verify return type 'int' for /home/carl/projects/nextcloud-docker-dev/workspace/server/lib/private/files/storage/storagefactory.php:60:1946:-:closure (see https://psalm.dev/047)
                usort($wrappers, static fn (array $a, array $b): int => $b['priority'] - $a['priority']);


ERROR: MixedOperand - lib/private/Files/Storage/StorageFactory.php:60:59 - Left operand cannot be mixed (see https://psalm.dev/059)
                usort($wrappers, static fn (array $a, array $b): int => $b['priority'] - $a['priority']);


ERROR: MixedReturnStatement - lib/private/Files/Storage/StorageFactory.php:60:59 - Could not infer a return type (see https://psalm.dev/138)
                usort($wrappers, static fn (array $a, array $b): int => $b['priority'] - $a['priority']);

@provokateurin
Copy link
Member

That's odd, I can take a look tomorrow if you want me to.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3. to review Waiting for reviews ♻️ refactor Refactor code (not a bug fix, not a feature just refactoring)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants