getStmt(); if ($stmt instanceof Property) { if ($stmt->isStatic()) { IssueBuffer::maybeAdd( // ImpureStaticProperty is close enough, all static properties are impure to my eyes new \Psalm\Issue\ImpureStaticProperty( 'Static property should not be used as they do not follow requests lifecycle', new CodeLocation($event->getStatementsSource(), $stmt), ), $event->getStatementsSource()->getSuppressedIssues(), ); } } elseif ($stmt instanceof Static_) { IssueBuffer::maybeAdd( // Same logic new \Psalm\Issue\ImpureStaticVariable( 'Static var should not be used as they do not follow requests lifecycle and are hard to reset', new CodeLocation($event->getStatementsSource(), $stmt), ), $event->getStatementsSource()->getSuppressedIssues(), ); } return null; } }