Skip to content

[Automated] Update psalm-baseline.xml - #29556

Closed
nextcloud-command wants to merge 6 commits into
stable20from
automated/noid/psalm-baseline-update-1636029717
Closed

[Automated] Update psalm-baseline.xml#29556
nextcloud-command wants to merge 6 commits into
stable20from
automated/noid/psalm-baseline-update-1636029717

Conversation

@nextcloud-command

@nextcloud-commandnextcloud-command commented Nov 4, 2021

Copy link
Copy Markdown
Contributor

Auto-generated update psalm-baseline.xml with fixed psalm warnings

Replace #29299

Signed-off-by: GitHub <noreply@github.com>
@nextcloud-command
nextcloud-command requested review from a team, CarlSchwan, icewind1991 and nickvergessen and removed request for a teamNovember 4, 2021 12:42
@skjnldsv

skjnldsv commented Nov 4, 2021

Copy link
Copy Markdown
Member

Fixes in progress

2 errors fixed
Error: Argument 2 of OCP\DB\QueryBuilder\IQueryBuilder::set expects OCP\DB\QueryBuilder\IParameter|string, OCP\DB\QueryBuilder\IQueryFunction provided with a __toString method
Error: Found a redundant condition when evaluating $result and trying to reconcile type 'true' to !falsy
Error: The declared return type 'string' for OC\Files\Storage\Wrapper\Availability::getLocalFile is incorrect, got 'bool|null|string'
Error: The inferred type 'bool|string' does not match the declared return type 'string' for OC\Files\Storage\Wrapper\Availability::getLocalFile
Error: The inherited return type 'string' for OCP\Files\Storage::getLocalFile is different to the implemented return type for OC\Files\Storage\Wrapper\Encoding::getlocalfile 'bool|string'
Error: Argument 12 of OC\Files\Stream\Encryption::wrap expects int, bool|int provided
Error: The inherited return type 'string' for OCP\Files\Storage::getLocalFile is different to the implemented return type for OC\Files\Storage\Wrapper\Encryption::getlocalfile 'bool|string'
Error: The inherited return type 'string' for OCP\Files\Storage::getLocalFile is different to the implemented return type for OC\Files\Storage\Wrapper\Jail::getlocalfile 'bool|string'
Error: The inherited return type 'string' for OCP\Files\Storage::getLocalFile is different to the implemented return type for OC\Files\Storage\Wrapper\Wrapper::getlocalfile 'bool|string'
Error: The declared return type 'string' for OC\Lockdown\Filesystem\NullStorage::getLocalFile does not allow false, but the function returns 'false'

@skjnldsvskjnldsv added 2. developing Work in progress and removed 3. to review Waiting for reviews labels Nov 4, 2021
@skjnldsv
skjnldsvforce-pushed the automated/noid/psalm-baseline-update-1636029717 branch from 3dbcf1f to e2751faCompareNovember 4, 2021 13:25
Signed-off-by: John Molakvoæ <skjnldsv@protonmail.com>
Signed-off-by: John Molakvoæ <skjnldsv@protonmail.com>
Signed-off-by: John Molakvoæ <skjnldsv@protonmail.com>
Signed-off-by: John Molakvoæ <skjnldsv@protonmail.com>
@skjnldsv
skjnldsvforce-pushed the automated/noid/psalm-baseline-update-1636029717 branch from 1658454 to f16eb30CompareNovember 4, 2021 14:42
@skjnldsv

Copy link
Copy Markdown
Member

@PVince81 wanna continue fixing this somehow? Tried my best, really not sure what I'm doing...

Signed-off-by: John Molakvoæ <skjnldsv@protonmail.com>
@MichaIngMichaIng added this to the Nextcloud 20.0.14 milestone Nov 5, 2021
@MichaIng

Copy link
Copy Markdown
Member

I don't understand the second error:

while ($resultand ($file = readdir($dh)) !== false) {

Found a redundant condition when evaluating $result and trying to reconcile type 'true' to !falsy

But at least due to low precedence of and (vs &&) only the resulting $file is compared to false, isn't it? Probably the following mutes it, but it shouldn't change anything about the logic:

while ($resultand (($file = readdir($dh)) !== false)) {

@MichaIng

Copy link
Copy Markdown
Member

Is this still relevant as of NC20 being EOL?

@skjnldsv

Copy link
Copy Markdown
Member

Maybe not yeah

@skjnldsv
skjnldsv deleted the automated/noid/psalm-baseline-update-1636029717 branch November 29, 2021 14:54
Sign up for freeto 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.

4 participants

@nextcloud-command@skjnldsv@MichaIng@rakekniven