Skip to content

Several issues discovered by PHPStan

Ran PHPStan at the lowest level on the code, and found a number of issues. Here's a set of patches to fix some of the simpler ones. Mostly this is use of undefined variables, but also a few other issues spotted, such as missing/incorrect imports, missing/incorrect returns and duplicate keys in literal arrays.

There's plenty of more issues to go through, but thought I'd pass these on to keep the patches manageable.

I have not made any attempt at verifying if the code works as intended, but then it did certainly not do so before these fixes. There's a few places where I've had to make educated guesses as to what is meant by the variable reference, but for the most part I've just defined it, eliminated the need for is, or replaced it with a literal placeholder of the appropriate type.

Merge request reports

Loading