We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent c099e7c commit 50e939eCopy full SHA for 50e939e
bin/skip-linting.php
@@ -10,11 +10,9 @@
10
$firstLine = fgets($f);
11
@fclose($f);
12
13
- if (!preg_match('~<?php\\s*\\/\\/\s*lint\s*([^\d\s]+)\s*([^\s]+)\s*~i', $firstLine, $m)) {
14
- $skip = false;
+ if (preg_match('~<?php\\s*\\/\\/\s*lint\s*([^\d\s]+)\s*([^\s]+)\s*~i', $firstLine, $m)) {
+ $skip = version_compare(PHP_VERSION, $m[2], $m[1]) === false;
15
}
16
-
17
- $skip = isset($m[2]) && !version_compare(PHP_VERSION, $m[2], $m[1]);
18
19
20
echo $file . ';' . ($skip ? '1' : '0') . PHP_EOL;
0 commit comments