Skip to content

Commit c44a3b1

Browse files
committed
Use Standards::isInstalledStandard() instead of Standards::getInstalledStandards()
1 parent b79c39a commit c44a3b1

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

Scripts/DocCodeExamples/XmlDocValidator.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -128,9 +128,7 @@ public function __construct(
128128
$subset = $dirs[\count($dirs) - 1];
129129
$this->sniff = $this->standard . '.' . $subset . '.' . \str_replace('Standard', '', $pathInfo['filename']);
130130

131-
$standards = Standards::getInstalledStandards(true);
132-
133-
if (\in_array($this->standard, $standards, true) === false) {
131+
if (Standards::isInstalledStandard($this->standard) === false) {
134132
throw new \RuntimeException(
135133
"The standard \"{$this->standard}\" is not installed in PHPCS."
136134
);

0 commit comments

Comments
 (0)