Skip to editor
Psalm
Docs
Playground
Plugins
Blog
Paid support
Share
Fix issues
Show original
PHP
Settings
<?php class A { public ?string $b = null; public ?string $c = null; } function takesA(A $obj): string { switch (true) { case $obj->b !== null: return $obj->b; case !is_null($obj->c): return $obj->c; default: throw new \InvalidArgumentException('$obj->b or $obj->c must be set'); } }
Issues
Types
idle
Saved Apr 6 2020 04:57 UTC
⌘/Ctrl+Enter
run
⌘/Ctrl+S
share
F8
/
⇧F8
next/prev issue