Review 11.5 Merged

73305[TASK] Avoid a 'Result of || is always true' phpstan error

Christian Kuhn CR +2 V +2 Easy +2 −14 updated 02/05/22, 12:33

Commit message

'ElementInformationController::getPropertiesForTable()'
checks two properties in an if condition with interface
checks. phpstan complains that the result of this 'or'
condition is always true because of a not proper set
docblock type hint of class property '$folderObject'.

This patch removes the docblock and use correct nullable
property typehint with direct null initialization to avoid
php fatal "read access before initialization" error. This
also removes one entry from phpstan baseline file.

Other baseline entries with same message are handled with
other patches - the solutions differ in each case.

> Build/Scripts/runTests.sh -s phpstanGenerateBaseline

Review

  • Code review CR +2

    Imported before Forger kept the single votes, the next import adds them.

  • Verified V +2

    Imported before Forger kept the single votes, the next import adds them.

Issues 1

Files 2