Skip to content

Commit

Permalink
apply rector
Browse files Browse the repository at this point in the history
  • Loading branch information
TomasVotruba committed Sep 29, 2023
1 parent ef4fcba commit 929f6e0
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/Rules/PHPUnit/NoTestMocksRule.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ final class NoTestMocksRule implements Rule, DocumentedRuleInterface
* @param string[] $allowedTypes
*/
public function __construct(
private array $allowedTypes = []
private readonly array $allowedTypes = []
) {
}

Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit 929f6e0

Please sign in to comment.