Skip to content

Commit 12794c0

Browse files
committed
#86 : max-errors parameter
1 parent 018ec53 commit 12794c0

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

run.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ function usage() {
3434

3535
"--lang" =>
3636
"[Optional] Language file to use for the result (en-us by default).",
37-
37+
3838
"--max-errors" =>
3939
"[Optional] Defines how many errors are still allowed for a pass (0 by default)",
4040

@@ -111,15 +111,15 @@ function usage() {
111111
$i++;
112112
$options['config'] = $_SERVER['argv'][$i];
113113
break;
114-
114+
115115
case "--debug":
116116
$options['debug'] = true;
117117
break;
118118

119119
case "--linecount":
120120
$options['linecount'] = true;
121121
break;
122-
122+
123123
case "--max-errors":
124124
$i++;
125125
$options['max-errors'] = $_SERVER['argv'][$i];
@@ -176,7 +176,7 @@ function usage() {
176176
echo "\nPlease specify a source directory/file using --src option.\n\n";
177177
usage();
178178
}
179-
if (!$options['max-errors']) {
179+
if (isset($options['max-errors']) && $options['max-errors'] === '') {
180180
echo "\nPlease specify a number when using --max-errors option.\n\n";
181181
usage();
182182
}

0 commit comments

Comments
 (0)