mirror of
https://github.com/danog/psalm-insane-comparison.git
synced 2024-11-30 04:29:20 +01:00
fix bug
This commit is contained in:
parent
ae8d3e7b6b
commit
e3ac706e72
@ -105,7 +105,7 @@ class InsaneComparisonAnalyzer implements AfterExpressionAnalysisInterface
|
|||||||
$eligible_string = null;
|
$eligible_string = null;
|
||||||
foreach ($string_operand->getAtomicTypes() as $possibly_string) {
|
foreach ($string_operand->getAtomicTypes() as $possibly_string) {
|
||||||
if ($possibly_string instanceof TLiteralString) {
|
if ($possibly_string instanceof TLiteralString) {
|
||||||
if(!preg_match('#\D#', $possibly_string->value[0] ?? '')) {
|
if(preg_match('#\D#', $possibly_string->value[0] ?? '')) {
|
||||||
$eligible_string = $possibly_string;
|
$eligible_string = $possibly_string;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user