Skip to editor
Psalm
Docs
Playground
Plugins
Blog
Paid support
Share
Fix issues
Show original
PHP
Settings
<?php declare(strict_types=1); namespace Foobar; use RuntimeException; use Throwable; /** * @psalm-consistent-constructor */ class AException extends RuntimeException { /** * @return static */ public static function create(string $message, int $code = 1337, ?Throwable $previous = null): static { return new static($previous, $message, $code); } public function __construct(?Throwable $previous, string $message, int $code) { parent::__construct($message, $code, $previous); } } class BException extends AException { public static function foobarException( string $message = 'A default message', int $code = 1001, ?Throwable $previous = null, ): static { return static::create($message, $code, $previous); } }
Issues
Types
idle
Saved Jul 26 2021 15:06 UTC
⌘/Ctrl+Enter
run
⌘/Ctrl+S
share
F8
/
⇧F8
next/prev issue