Skip to content

Commit

Permalink
Fixed PHP < 7.3
Browse files Browse the repository at this point in the history
  • Loading branch information
ondrejmirtes committed Mar 23, 2019
1 parent 96c57c6 commit 37dd975
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Rules/Generators/YieldFromTypeRule.php
Expand Up @@ -77,14 +77,14 @@ public function processNode(Node $node, Scope $scope): array
$messages[] = sprintf(
'Generator expects key type %s, %s given.',
$returnType->getIterableKeyType()->describe(VerbosityLevel::typeOnly()),
$exprType->getIterableKeyType()->describe(VerbosityLevel::typeOnly()),
$exprType->getIterableKeyType()->describe(VerbosityLevel::typeOnly())
);
}
if (!$this->ruleLevelHelper->accepts($returnType->getIterableValueType(), $exprType->getIterableValueType(), $scope->isDeclareStrictTypes())) {
$messages[] = sprintf(
'Generator expects value type %s, %s given.',
$returnType->getIterableValueType()->describe(VerbosityLevel::typeOnly()),
$exprType->getIterableValueType()->describe(VerbosityLevel::typeOnly()),
$exprType->getIterableValueType()->describe(VerbosityLevel::typeOnly())
);
}

Expand Down

0 comments on commit 37dd975

Please sign in to comment.