From 4767298e4f82498e19b5caab8d5e8309807ab1a1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20M=C3=B6ller?= Date: Fri, 3 Jul 2020 11:14:34 +0200 Subject: [PATCH] Fix: Run 'php-cs-fixer fix' --- src/Framework/Exception/InvalidArgumentException.php | 2 +- src/Util/Configuration.php | 4 ++-- src/Util/GlobalState.php | 2 +- src/Util/TestDox/NamePrettifier.php | 2 +- src/Util/TestDox/ResultPrinter.php | 4 ++-- src/Util/VersionComparisonOperator.php | 2 +- 6 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/Framework/Exception/InvalidArgumentException.php b/src/Framework/Exception/InvalidArgumentException.php index 48249ad748f..b3fa7d35f44 100644 --- a/src/Framework/Exception/InvalidArgumentException.php +++ b/src/Framework/Exception/InvalidArgumentException.php @@ -24,7 +24,7 @@ public static function create(int $argument, string $type): self $argument, $stack[1]['class'], $stack[1]['function'], - \in_array(\lcfirst($type)[0], ['a', 'e', 'i', 'o', 'u']) ? 'an' : 'a', + \in_array(\lcfirst($type)[0], ['a', 'e', 'i', 'o', 'u'], true) ? 'an' : 'a', $type ) ); diff --git a/src/Util/Configuration.php b/src/Util/Configuration.php index 39e227ef0f8..10ad144b7b3 100644 --- a/src/Util/Configuration.php +++ b/src/Util/Configuration.php @@ -981,7 +981,7 @@ private function getTestSuite(DOMElement $testSuiteNode, string $testSuiteFilter foreach ($testSuiteNode->getElementsByTagName('directory') as $directoryNode) { \assert($directoryNode instanceof DOMElement); - if (!empty($testSuiteFilter) && !\in_array($directoryNode->parentNode->getAttribute('name'), $testSuiteFilter)) { + if (!empty($testSuiteFilter) && !\in_array($directoryNode->parentNode->getAttribute('name'), $testSuiteFilter, true)) { continue; } @@ -1008,7 +1008,7 @@ private function getTestSuite(DOMElement $testSuiteNode, string $testSuiteFilter foreach ($testSuiteNode->getElementsByTagName('file') as $fileNode) { \assert($fileNode instanceof DOMElement); - if (!empty($testSuiteFilter) && !\in_array($fileNode->parentNode->getAttribute('name'), $testSuiteFilter)) { + if (!empty($testSuiteFilter) && !\in_array($fileNode->parentNode->getAttribute('name'), $testSuiteFilter, true)) { continue; } diff --git a/src/Util/GlobalState.php b/src/Util/GlobalState.php index 812c1dd9236..7b9e0b9f8d4 100644 --- a/src/Util/GlobalState.php +++ b/src/Util/GlobalState.php @@ -56,7 +56,7 @@ public static function processIncludedFilesAsString(array $files): string $file = $files[$i]; if (!empty($GLOBALS['__PHPUNIT_ISOLATION_BLACKLIST']) && - \in_array($file, $GLOBALS['__PHPUNIT_ISOLATION_BLACKLIST'])) { + \in_array($file, $GLOBALS['__PHPUNIT_ISOLATION_BLACKLIST'], true)) { continue; } diff --git a/src/Util/TestDox/NamePrettifier.php b/src/Util/TestDox/NamePrettifier.php index f560c8eba24..ddf2fed14b4 100644 --- a/src/Util/TestDox/NamePrettifier.php +++ b/src/Util/TestDox/NamePrettifier.php @@ -165,7 +165,7 @@ public function prettifyTestMethod(string $name): string $string = (string) \preg_replace('#\d+$#', '', $name, -1, $count); - if (\in_array($string, $this->strings)) { + if (\in_array($string, $this->strings, true)) { $name = $string; } elseif ($count === 0) { $this->strings[] = $string; diff --git a/src/Util/TestDox/ResultPrinter.php b/src/Util/TestDox/ResultPrinter.php index a2ad64c7675..72e6451b8e1 100644 --- a/src/Util/TestDox/ResultPrinter.php +++ b/src/Util/TestDox/ResultPrinter.php @@ -316,7 +316,7 @@ private function isOfInterest(Test $test): bool if (!empty($this->groups)) { foreach ($test->getGroups() as $group) { - if (\in_array($group, $this->groups)) { + if (\in_array($group, $this->groups, true)) { return true; } } @@ -326,7 +326,7 @@ private function isOfInterest(Test $test): bool if (!empty($this->excludeGroups)) { foreach ($test->getGroups() as $group) { - if (\in_array($group, $this->excludeGroups)) { + if (\in_array($group, $this->excludeGroups, true)) { return false; } } diff --git a/src/Util/VersionComparisonOperator.php b/src/Util/VersionComparisonOperator.php index 4c7c3400ce9..15ff52b9779 100644 --- a/src/Util/VersionComparisonOperator.php +++ b/src/Util/VersionComparisonOperator.php @@ -42,7 +42,7 @@ public function asString(): string */ private function ensureOperatorIsValid(string $operator): void { - if (!\in_array($operator, ['<', 'lt', '<=', 'le', '>', 'gt', '>=', 'ge', '==', '=', 'eq', '!=', '<>', 'ne'])) { + if (!\in_array($operator, ['<', 'lt', '<=', 'le', '>', 'gt', '>=', 'ge', '==', '=', 'eq', '!=', '<>', 'ne'], true)) { throw new Exception( \sprintf( '"%s" is not a valid version_compare() operator',