|
@@ 539-548 (lines=10) @@
|
| 536 |
|
if (defined('PHP_CODESNIFFER_IN_TESTS') === true && empty($restrictions) === false) { |
| 537 |
|
// Should be one standard and one sniff being tested at a time. |
| 538 |
|
$installed = $this->getInstalledStandardPath($standards[0]); |
| 539 |
|
if ($installed !== null) { |
| 540 |
|
$standard = $installed; |
| 541 |
|
} else { |
| 542 |
|
$standard = self::realpath($standards[0]); |
| 543 |
|
if (is_dir($standard) === true |
| 544 |
|
&& is_file(self::realpath($standard.DIRECTORY_SEPARATOR.'ruleset.xml')) === true |
| 545 |
|
) { |
| 546 |
|
$standard = self::realpath($standard.DIRECTORY_SEPARATOR.'ruleset.xml'); |
| 547 |
|
} |
| 548 |
|
} |
| 549 |
|
|
| 550 |
|
$sniffs = $this->_expandRulesetReference($restrictions[0], dirname($standard)); |
| 551 |
|
} else { |
|
@@ 555-564 (lines=10) @@
|
| 552 |
|
$sniffs = array(); |
| 553 |
|
foreach ($standards as $standard) { |
| 554 |
|
$installed = $this->getInstalledStandardPath($standard); |
| 555 |
|
if ($installed !== null) { |
| 556 |
|
$standard = $installed; |
| 557 |
|
} else { |
| 558 |
|
$standard = self::realpath($standard); |
| 559 |
|
if (is_dir($standard) === true |
| 560 |
|
&& is_file(self::realpath($standard.DIRECTORY_SEPARATOR.'ruleset.xml')) === true |
| 561 |
|
) { |
| 562 |
|
$standard = self::realpath($standard.DIRECTORY_SEPARATOR.'ruleset.xml'); |
| 563 |
|
} |
| 564 |
|
} |
| 565 |
|
|
| 566 |
|
if (PHP_CODESNIFFER_VERBOSITY === 1) { |
| 567 |
|
$ruleset = simplexml_load_string(file_get_contents($standard)); |