1
0
mirror of https://github.com/danog/psalm.git synced 2024-11-27 04:45:20 +01:00

Adjust tolerances

This commit is contained in:
Brown 2020-05-22 21:37:18 -04:00
parent fb3cb2c4d1
commit e82c317d53
2 changed files with 4 additions and 1 deletions

View File

@ -23,7 +23,9 @@ class BinaryOpAnalyzer
int $nesting = 0,
bool $from_stmt = false
) : bool {
if ($stmt instanceof PhpParser\Node\Expr\BinaryOp\Concat && $nesting > 20) {
if ($stmt instanceof PhpParser\Node\Expr\BinaryOp\Concat && $nesting > 100) {
$statements_analyzer->node_data->setType($stmt, Type::getBool());
// ignore deeply-nested string concatenation
return true;
}

View File

@ -1872,6 +1872,7 @@ class ClassLikes
&& $method_name !== '__clone'
&& $method_name !== '__invoke'
&& $method_name !== '__unset'
&& $method_name !== '__isset'
&& $method_name !== '__sleep'
&& $method_name !== '__wakeup'
&& $method_name !== '__serialize'