Skip to content

Commit

Permalink
enable checkBenevolentUnionTypes
Browse files Browse the repository at this point in the history
  • Loading branch information
schlndh committed May 11, 2024
1 parent 54acb4c commit b2cce8e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions phpstan.neon.dist
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ parameters:
- tests
treatPhpDocTypesAsCertain: false
checkImplicitMixed: true
checkBenevolentUnionTypes: true
excludePaths:
- tests/*/data/*
exceptions:
Expand Down
2 changes: 2 additions & 0 deletions src/Parser/MariaDbParserState.php
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@
use function count;
use function implode;
use function in_array;
use function is_int;
use function is_string;
use function max;
use function reset;
Expand Down Expand Up @@ -2116,6 +2117,7 @@ private function parseRestOfPositionFunctionCall(Token $functionIdent): Function

static $inPrecedence = null;
$inPrecedence ??= $this->getOperatorPrecedence(SpecialOpTypeEnum::IN);
assert(is_int($inPrecedence));

// If we encounter IN we want to interpret it as the separator between the two arguments
$substrExpr = $this->parseExpression($inPrecedence + 1);
Expand Down

0 comments on commit b2cce8e

Please sign in to comment.