Skip to editor
Psalm
Docs
Playground
Plugins
Blog
Paid support
Share
Fix issues
Show original
PHP
Settings
<?php enum Action { case Create; case Read; case Delete; } /** @psalm-suppress RedundantCondition */ function exhaustiveIf(Action $value): string { if ($value === Action::Create) { return 'foo'; } elseif ($value === Action::Delete) { return 'bar'; } else { /** @psalm-check-type $value = never */; throw new RuntimeException(); } } function exhaustiveSwitch(Action $value): string { switch ($value) { case Action::Create: return 'foo'; case Action::Delete: return 'bar'; default: /** @psalm-check-type $value = never */; throw new RuntimeException; } }
Issues
Types
idle
Saved Jul 27 2023 21:04 UTC
⌘/Ctrl+Enter
run
⌘/Ctrl+S
share
F8
/
⇧F8
next/prev issue