mirror of
https://github.com/danog/psalm.git
synced 2025-01-21 21:31:13 +01:00
Type::getString already respects maxStringLength config, there is no need to additional checks (#3069)
This commit is contained in:
parent
e34a3a9281
commit
c8e7e43bb0
@ -1645,9 +1645,7 @@ class StatementsAnalyzer extends SourceAnalyzer implements StatementsSource
|
||||
) {
|
||||
$result = $left->getSingleStringLiteral()->value . $right->getSingleStringLiteral()->value;
|
||||
|
||||
if (strlen($result) < 50) {
|
||||
return Type::getString($result);
|
||||
}
|
||||
return Type::getString($result);
|
||||
}
|
||||
|
||||
return Type::getString();
|
||||
@ -1823,7 +1821,7 @@ class StatementsAnalyzer extends SourceAnalyzer implements StatementsSource
|
||||
}
|
||||
|
||||
if ($stmt instanceof PhpParser\Node\Scalar\String_) {
|
||||
return Type::getString(strlen($stmt->value) < 30 ? $stmt->value : null);
|
||||
return Type::getString($stmt->value);
|
||||
}
|
||||
|
||||
if ($stmt instanceof PhpParser\Node\Scalar\LNumber) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user