File tree Expand file tree Collapse file tree 1 file changed +10
-4
lines changed Expand file tree Collapse file tree 1 file changed +10
-4
lines changed Original file line number Diff line number Diff line change 1
1
<?php
2
2
use JakubOnderka \PhpVarDumpCheck ;
3
3
4
+ const VERSION = '0.2 ' ;
5
+
4
6
const SUCCESS = 0 ,
5
7
WITH_ERRORS = 1 ,
6
8
FAILED = 255 ;
@@ -23,15 +25,14 @@ function showOptions()
23
25
--exclude Exclude directory. If you want exclude multiple directory, use
24
26
multiple exclude parameters.
25
27
--no-colors Disable colors in console output.
28
+ -V, --version Show version.
26
29
-h, --help Print this help.
27
30
<?php
28
31
}
29
32
30
- /**
31
- * Help
32
- */
33
+ // Help
33
34
if (!isset ($ _SERVER ['argv ' ][1 ]) || in_array ('-h ' , $ _SERVER ['argv ' ]) || in_array ('--help ' , $ _SERVER ['argv ' ])) { ?>
34
- PHP Var Dump check version 0.2
35
+ PHP Var Dump check version <?= VERSION ?>
35
36
---------------------------
36
37
Usage:
37
38
var-dump-check [files or directories]
@@ -40,6 +41,11 @@ function showOptions()
40
41
exit ;
41
42
}
42
43
44
+ // Version
45
+ if (in_array ('-V ' , $ _SERVER ['argv ' ]) || in_array ('--version ' , $ _SERVER ['argv ' ])) {
46
+ echo VERSION . PHP_EOL ;
47
+ exit ;
48
+ }
43
49
44
50
$ files = array (
45
51
__DIR__ . '/../../autoload.php ' ,
You can’t perform that action at this time.
0 commit comments