You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<?php/** @psalm-immutable */finalclass Mass {
publicfunction__construct(privateint$value) {}
publicfunctiongetValue(): int { return$this->value; }
}
$masses = [newMass(1), newMass(2)];
foreach ($massesas$mass) {
if ($mass->getValue() === $mass->getValue()) {} // should be flagged as RedundantConditionif ($mass->getValue() !== $mass->getValue()) {} // should be flagged as impossible
}
https://psalm.dev/r/2b1b91e0d1
The text was updated successfully, but these errors were encountered: