File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -412,16 +412,12 @@ public function isScalar(): TrinaryLogic
412412 public function looseCompare (Type $ type , PhpVersion $ phpVersion ): BooleanType
413413 {
414414 if ($ this ->inverse ) {
415- // A non-decimal-int-string may still be numeric ("02", "2.0", "1e1")
416- // or empty (""), so it can be loosely equal to a decimal-int-string,
417- // another numeric value or null. Nothing can be decided here.
415+ // may be numeric ("02", "2.0") or empty (""), so nothing is decidable
418416 return new BooleanType ();
419417 }
420418
421- // A decimal-int-string is a numeric string, so it compares like one:
422- // numerically against other numeric strings (and numbers), and never
423- // loosely equal to null (it is always non-empty) or to a non-numeric
424- // string (that would be a byte-wise comparison that cannot match).
419+ // a decimal-int-string is a non-empty numeric string, so it compares
420+ // like one: never loosely equal to null or to a non-numeric string
425421 if ($ type ->isNull ()->yes ()) {
426422 return new ConstantBooleanType (false );
427423 }
You can’t perform that action at this time.
0 commit comments