Skip to content

Commit

Permalink
Reuse object
Browse files Browse the repository at this point in the history
  • Loading branch information
cs278 committed Jan 16, 2020
1 parent b49e211 commit dec9c89
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/Rules/Functions/RandomIntParametersRule.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,9 @@ public function processNode(Node $node, Scope $scope): array

$minType = $scope->getType($node->args[0]->value)->toInteger();
$maxType = $scope->getType($node->args[1]->value)->toInteger();
$integerType = new IntegerType();

if ($minType->equals(new IntegerType()) || $maxType->equals(new IntegerType())) {
if ($minType->equals($integerType) || $maxType->equals($integerType)) {
return [];
}

Expand Down

0 comments on commit dec9c89

Please sign in to comment.