webmozarts / assert

Assertions to validate method input/output with nice error messages.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

`all*` methods are actually impure

BackEndTea opened this issue · comments

Ran into this while seeing if we could use psalm to check the code base itself.

So the question is, should we mark them as impure?

ERROR: ImpureMethodCall - src/Mixin.php:3210:9 - Cannot call a possibly-mutating Traversable::getIterator from a pure context (see https://psalm.dev/203)
        foreach ($array as $entry) {
            static::isNonEmptyMap($entry, $message);
        }