1 | <?php |
||
17 | class ExitException extends \Exception { |
||
18 | use StaticConstructors; |
||
19 | /** |
||
20 | * @var int the exit status code |
||
21 | */ |
||
22 | public $statusCode; |
||
23 | |||
24 | /** |
||
25 | * Constructor. |
||
26 | * |
||
27 | * @param int $status the exit status code |
||
28 | * @param string $message error message |
||
|
|||
29 | * @param int $code error code |
||
30 | * @param Throwable $previous The previous exception used for the exception chaining. |
||
31 | */ |
||
32 | public function __construct($status = 0, $message = null, $code = 0, Throwable $previous = null) { |
||
36 | |||
37 | public static function withStatusCode(int $code): self { |
||
42 | |||
43 | public function getName() { |
||
46 | |||
47 | public function andStatusCode(int $code): self { |
||
52 | } |
This check looks for
@param
annotations where the type inferred by our type inference engine differs from the declared type.It makes a suggestion as to what type it considers more descriptive.
Most often this is a case of a parameter that can be null in addition to its declared types.