Skip to content

chore(psalm): throw directly to make types more obvious - #8756

Merged
max-nextcloud merged 2 commits into
mainfrom
chore/fix-psalm-php-version-8.3
Jun 17, 2026
Merged

max-nextcloud merged 2 commits into
mainfrom
chore/fix-psalm-php-version-8.3

Conversation

@max-nextcloud

@max-nextcloud max-nextcloud commented Jun 17, 2026 •

Copy link
Copy Markdown
Contributor
  • Check $file for null and empty($file) separately.

  • Throw exception right away if $file is null.
    This way the type of $file can be narrowed down afterwards
    and psalm is happy about the function always returning an array.

    Follow up for chore(psalm): bump phpVersion to 8.3 #8752

* Check $file for `null` and `empty($file)` separately.
* Throw exception right away if $file is null.
  This way the type of $file can be narrowed down afterwards
  and psalm is happy about the function always returning an array.

Signed-off-by: Max <max@nextcloud.com>
Signed-off-by: Max <max@nextcloud.com>
@max-nextcloud max-nextcloud mentioned this pull request Jun 17, 2026
2 of 4 tasks
Base automatically changed from chore/php-version-8.3 to main June 17, 2026 08:53
@max-nextcloud
max-nextcloud merged commit 7dd0f32 into main Jun 17, 2026
62 checks passed
@max-nextcloud
max-nextcloud deleted the chore/fix-psalm-php-version-8.3 branch June 17, 2026 09:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants