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

[Automated] Update psalm-baseline.xml #29556

Conversation

nextcloud-command
Copy link
Contributor

@nextcloud-command nextcloud-command commented Nov 4, 2021

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, nickvergessen, icewind1991 and CarlSchwan and removed request for a team November 4, 2021 12:42
@skjnldsv
Copy link
Member

skjnldsv commented Nov 4, 2021

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'

@skjnldsv skjnldsv added 2. developing Work in progress and removed 3. to review Waiting for reviews labels Nov 4, 2021
@skjnldsv skjnldsv force-pushed the automated/noid/psalm-baseline-update-1636029717 branch from 3dbcf1f to e2751fa Compare November 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 skjnldsv force-pushed the automated/noid/psalm-baseline-update-1636029717 branch from 1658454 to f16eb30 Compare November 4, 2021 14:42
@skjnldsv
Copy link
Member

skjnldsv commented Nov 4, 2021

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

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

MichaIng commented Nov 5, 2021

I don't understand the second error:

while ($result and ($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 ($result and (($file = readdir($dh)) !== false)) {

@MichaIng
Copy link
Member

Is this still relevant as of NC20 being EOL?

@skjnldsv
Copy link
Member

Maybe not yeah

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

4 participants