Skip to content

Commit d60e45d

Browse files
committed
Use 254 as fatal return code, because 255 is reserved for PHP itself
1 parent 38b3431 commit d60e45d

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
lines changed

parallel-lint

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ either expressed or implied, of the FreeBSD Project.
3232

3333
if (!defined('PHP_VERSION_ID') || PHP_VERSION_ID < 50400) {
3434
echo "PHP Parallel Lint require PHP 5.4.0 or newer.", PHP_EOL;
35-
die(255);
35+
die(254);
3636
}
3737

3838
$autoloadLocations = [
@@ -56,7 +56,7 @@ if (!$loaded) {
5656
'curl -s http://getcomposer.org/installer | php' . PHP_EOL .
5757
'php composer.phar install' . PHP_EOL
5858
);
59-
exit(255);
59+
exit(254);
6060
}
6161

6262
$app = new JakubOnderka\PhpParallelLint\Application();

src/Application.php

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,11 @@
55
class Application
66
{
77
const VERSION = '1.0.0';
8-
const SUCCESS = 0;
9-
const WITH_ERRORS = 1;
10-
const FAILED = 255;
8+
9+
// Return codes
10+
const SUCCESS = 0,
11+
WITH_ERRORS = 1,
12+
FAILED = 254; // Error code 255 is reserved for PHP itself
1113

1214
/**
1315
* Run the application

0 commit comments

Comments
 (0)