Skip to content

Commit cfd1b44

Browse files
committed
refactor: replace magic numbers with constants
1 parent 3800c5d commit cfd1b44

3 files changed

Lines changed: 5 additions & 5 deletions

File tree

system/Database/Exceptions/DatabaseException.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,5 +20,5 @@ class DatabaseException extends Error implements ExceptionInterface
2020
*
2121
* @var int
2222
*/
23-
protected $code = 8;
23+
protected $code = EXIT_DATABASE;
2424
}

system/Exceptions/CastException.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,11 @@ class CastException extends CriticalError
2323
use DebugTraceableTrait;
2424

2525
/**
26-
* Error code
26+
* Exit status code
2727
*
2828
* @var int
2929
*/
30-
protected $code = 3;
30+
protected $code = EXIT_CONFIG;
3131

3232
public static function forInvalidJsonFormatException(int $error)
3333
{

system/Exceptions/ConfigException.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,11 @@ class ConfigException extends CriticalError
1919
use DebugTraceableTrait;
2020

2121
/**
22-
* Error code
22+
* Exit status code
2323
*
2424
* @var int
2525
*/
26-
protected $code = 3;
26+
protected $code = EXIT_CONFIG;
2727

2828
public static function forDisabledMigrations()
2929
{

0 commit comments

Comments
 (0)