@@ -376,7 +376,7 @@ public function walkFunction($function): string
376376 new FloatType ()
377377 );
378378
379- if (TypeCombinator:: containsNull ($ exprType )) {
379+ if ($ this -> canBeNull ($ exprType )) {
380380 $ type = TypeCombinator::addNull ($ type );
381381 }
382382
@@ -388,7 +388,7 @@ public function walkFunction($function): string
388388 $ secondExprType = $ this ->unmarshalType ($ function ->secondArithmetic ->dispatch ($ this ));
389389
390390 $ type = IntegerRangeType::fromInterval (0 , null );
391- if (TypeCombinator:: containsNull ($ firstExprType ) || TypeCombinator:: containsNull ($ secondExprType )) {
391+ if ($ this -> canBeNull ($ firstExprType ) || $ this -> canBeNull ($ secondExprType )) {
392392 $ type = TypeCombinator::addNull ($ type );
393393 }
394394
@@ -399,7 +399,7 @@ public function walkFunction($function): string
399399
400400 foreach ($ function ->concatExpressions as $ expr ) {
401401 $ type = $ this ->unmarshalType ($ expr ->dispatch ($ this ));
402- $ hasNull = $ hasNull || TypeCombinator:: containsNull ($ type );
402+ $ hasNull = $ hasNull || $ this -> canBeNull ($ type );
403403 }
404404
405405 $ type = new StringType ();
@@ -420,7 +420,7 @@ public function walkFunction($function): string
420420 $ intervalExprType = $ this ->unmarshalType ($ function ->intervalExpression ->dispatch ($ this ));
421421
422422 $ type = new StringType ();
423- if (TypeCombinator:: containsNull ($ dateExprType ) || TypeCombinator:: containsNull ($ intervalExprType )) {
423+ if ($ this -> canBeNull ($ dateExprType ) || $ this -> canBeNull ($ intervalExprType )) {
424424 $ type = TypeCombinator::addNull ($ type );
425425 }
426426
@@ -434,7 +434,7 @@ public function walkFunction($function): string
434434 new IntegerType (),
435435 new FloatType ()
436436 );
437- if (TypeCombinator:: containsNull ($ date1ExprType ) || TypeCombinator:: containsNull ($ date2ExprType )) {
437+ if ($ this -> canBeNull ($ date1ExprType ) || $ this -> canBeNull ($ date2ExprType )) {
438438 $ type = TypeCombinator::addNull ($ type );
439439 }
440440
@@ -444,7 +444,7 @@ public function walkFunction($function): string
444444 $ stringPrimaryType = $ this ->unmarshalType ($ function ->stringPrimary ->dispatch ($ this ));
445445
446446 $ type = IntegerRangeType::fromInterval (0 , null );
447- if (TypeCombinator:: containsNull ($ stringPrimaryType )) {
447+ if ($ this -> canBeNull ($ stringPrimaryType )) {
448448 $ type = TypeCombinator::addNull ($ type );
449449 }
450450
@@ -455,7 +455,7 @@ public function walkFunction($function): string
455455 $ secondExprType = $ this ->unmarshalType ($ this ->walkStringPrimary ($ function ->secondStringPrimary ));
456456
457457 $ type = IntegerRangeType::fromInterval (0 , null );
458- if (TypeCombinator:: containsNull ($ firstExprType ) || TypeCombinator:: containsNull ($ secondExprType )) {
458+ if ($ this -> canBeNull ($ firstExprType ) || $ this -> canBeNull ($ secondExprType )) {
459459 $ type = TypeCombinator::addNull ($ type );
460460 }
461461
@@ -467,7 +467,7 @@ public function walkFunction($function): string
467467 $ stringPrimaryType = $ this ->unmarshalType ($ function ->stringPrimary ->dispatch ($ this ));
468468
469469 $ type = new StringType ();
470- if (TypeCombinator:: containsNull ($ stringPrimaryType )) {
470+ if ($ this -> canBeNull ($ stringPrimaryType )) {
471471 $ type = TypeCombinator::addNull ($ type );
472472 }
473473
@@ -478,7 +478,7 @@ public function walkFunction($function): string
478478 $ secondExprType = $ this ->unmarshalType ($ this ->walkSimpleArithmeticExpression ($ function ->secondSimpleArithmeticExpression ));
479479
480480 $ type = IntegerRangeType::fromInterval (0 , null );
481- if (TypeCombinator:: containsNull ($ firstExprType ) || TypeCombinator:: containsNull ($ secondExprType )) {
481+ if ($ this -> canBeNull ($ firstExprType ) || $ this -> canBeNull ($ secondExprType )) {
482482 $ type = TypeCombinator::addNull ($ type );
483483 }
484484
@@ -493,7 +493,7 @@ public function walkFunction($function): string
493493 $ exprType = $ this ->unmarshalType ($ this ->walkSimpleArithmeticExpression ($ function ->simpleArithmeticExpression ));
494494
495495 $ type = new FloatType ();
496- if (TypeCombinator:: containsNull ($ exprType )) {
496+ if ($ this -> canBeNull ($ exprType )) {
497497 $ type = TypeCombinator::addNull ($ type );
498498 }
499499
@@ -510,7 +510,7 @@ public function walkFunction($function): string
510510 }
511511
512512 $ type = new StringType ();
513- if (TypeCombinator:: containsNull ($ stringType ) || TypeCombinator:: containsNull ($ firstExprType ) || TypeCombinator:: containsNull ($ secondExprType )) {
513+ if ($ this -> canBeNull ($ stringType ) || $ this -> canBeNull ($ firstExprType ) || $ this -> canBeNull ($ secondExprType )) {
514514 $ type = TypeCombinator::addNull ($ type );
515515 }
516516
@@ -714,7 +714,7 @@ public function walkCoalesceExpression($coalesceExpression): string
714714 }
715715
716716 $ type = $ this ->unmarshalType ($ expression ->dispatch ($ this ));
717- $ allTypesContainNull = $ allTypesContainNull && TypeCombinator:: containsNull ($ type );
717+ $ allTypesContainNull = $ allTypesContainNull && $ this -> canBeNull ($ type );
718718
719719 // Some drivers manipulate the types, lets avoid false positives by generalizing constant types
720720 // e.g. sqlsrv: "COALESCE returns the data type of value with the highest precedence"
0 commit comments