|
@@ 1033-1042 (lines=10) @@
|
| 1030 |
|
// this format are relative paths and attempt to convert them |
| 1031 |
|
// to absolute paths. If this fails, let the reference run through |
| 1032 |
|
// the normal checks and have it fail as normal. |
| 1033 |
|
if (substr($ref, 0, 1) === '.') { |
| 1034 |
|
$realpath = self::realpath($rulesetDir.'/'.$ref); |
| 1035 |
|
if ($realpath !== false) { |
| 1036 |
|
$ref = $realpath; |
| 1037 |
|
if (PHP_CODESNIFFER_VERBOSITY > 1) { |
| 1038 |
|
echo str_repeat("\t", $depth); |
| 1039 |
|
echo "\t\t=> $ref".PHP_EOL; |
| 1040 |
|
} |
| 1041 |
|
} |
| 1042 |
|
} |
| 1043 |
|
|
| 1044 |
|
// As sniffs can't begin with a tilde, assume references in |
| 1045 |
|
// this format at relative to the user's home directory. |
|
@@ 1046-1055 (lines=10) @@
|
| 1043 |
|
|
| 1044 |
|
// As sniffs can't begin with a tilde, assume references in |
| 1045 |
|
// this format at relative to the user's home directory. |
| 1046 |
|
if (substr($ref, 0, 2) === '~/') { |
| 1047 |
|
$realpath = self::realpath($ref); |
| 1048 |
|
if ($realpath !== false) { |
| 1049 |
|
$ref = $realpath; |
| 1050 |
|
if (PHP_CODESNIFFER_VERBOSITY > 1) { |
| 1051 |
|
echo str_repeat("\t", $depth); |
| 1052 |
|
echo "\t\t=> $ref".PHP_EOL; |
| 1053 |
|
} |
| 1054 |
|
} |
| 1055 |
|
} |
| 1056 |
|
|
| 1057 |
|
if (is_file($ref) === true) { |
| 1058 |
|
if (substr($ref, -9) === 'Sniff.php') { |