Skip to content

Commit

Permalink
Fix build
Browse files Browse the repository at this point in the history
  • Loading branch information
ondrejmirtes committed Oct 9, 2020
1 parent bcd9b68 commit 287d53f
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions tests/Rules/Operators/OperandsInArithmeticAdditionRuleTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

use PHPStan\Rules\Rule;
use PHPStan\Rules\RuleLevelHelper;
use const PHP_VERSION_ID;

class OperandsInArithmeticAdditionRuleTest extends \PHPStan\Testing\RuleTestCase
{
Expand All @@ -19,7 +20,7 @@ protected function getRule(): Rule

public function testRule(): void
{
$this->analyse([__DIR__ . '/data/operators.php'], [
$messages = [
[
'Only numeric types are allowed in +, string given on the right side.',
25,
Expand All @@ -36,11 +37,14 @@ public function testRule(): void
'Only numeric types are allowed in +, string given on the right side.',
29,
],
[
];
if (PHP_VERSION_ID < 80000) {
$messages[] = [
'Only numeric types are allowed in +, (array<int, string>|false) given on the left side.',
110,
],
]);
];
}
$this->analyse([__DIR__ . '/data/operators.php'], $messages);
}

}

0 comments on commit 287d53f

Please sign in to comment.