From 929f6e00709b9e8368f17f7a23065207e48639b2 Mon Sep 17 00:00:00 2001 From: Tomas Votruba Date: Fri, 29 Sep 2023 10:18:46 +0200 Subject: [PATCH] apply rector --- src/Rules/PHPUnit/NoTestMocksRule.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Rules/PHPUnit/NoTestMocksRule.php b/src/Rules/PHPUnit/NoTestMocksRule.php index 07a22df0..bfc705e4 100644 --- a/src/Rules/PHPUnit/NoTestMocksRule.php +++ b/src/Rules/PHPUnit/NoTestMocksRule.php @@ -34,7 +34,7 @@ final class NoTestMocksRule implements Rule, DocumentedRuleInterface * @param string[] $allowedTypes */ public function __construct( - private array $allowedTypes = [] + private readonly array $allowedTypes = [] ) { } @@ -112,8 +112,8 @@ private function resolveMockedObjectType(MethodCall $methodCall, Scope $scope): $mockedArgValue = $args[0]->value; $variableType = $scope->getType($mockedArgValue); - foreach ($variableType->getConstantStrings() as $constantString) { - return new ObjectType($constantString->getValue()); + foreach ($variableType->getConstantStrings() as $constantStringType) { + return new ObjectType($constantStringType->getValue()); } return null;