3535use PHPStan \Type \VerbosityLevel ;
3636
3737/**
38- * This accessory type is coupled with `Type::isDecimalIntegerStringType ()` method.
38+ * This accessory type is coupled with `Type::isDecimalIntegerString ()` method.
3939 *
4040 * When inverse=false, this represents strings containing decimal integers.
4141 * These are guaranteed to be cast to an integer in an array key.
@@ -84,11 +84,11 @@ public function getConstantStrings(): array
8484
8585 public function accepts (Type $ type , bool $ strictTypes ): AcceptsResult
8686 {
87- $ isDecimalIntegerStringType = $ type ->isDecimalIntegerStringType ();
87+ $ isDecimalIntegerString = $ type ->isDecimalIntegerString ();
8888
8989 if (
9090 $ type ->isString ()->yes ()
91- && ($ this ->inverse ? $ isDecimalIntegerStringType ->no () : $ isDecimalIntegerStringType ->yes ())
91+ && ($ this ->inverse ? $ isDecimalIntegerString ->no () : $ isDecimalIntegerString ->yes ())
9292 ) {
9393 return AcceptsResult::createYes ();
9494 }
@@ -97,7 +97,7 @@ public function accepts(Type $type, bool $strictTypes): AcceptsResult
9797 return $ type ->isAcceptedBy ($ this , $ strictTypes );
9898 }
9999
100- $ result = $ type ->isString ()->and ($ this ->inverse ? $ isDecimalIntegerStringType ->negate () : $ isDecimalIntegerStringType );
100+ $ result = $ type ->isString ()->and ($ this ->inverse ? $ isDecimalIntegerString ->negate () : $ isDecimalIntegerString );
101101
102102 return new AcceptsResult ($ result , []);
103103 }
@@ -112,8 +112,8 @@ public function isSuperTypeOf(Type $type): IsSuperTypeOfResult
112112 return IsSuperTypeOfResult::createYes ();
113113 }
114114
115- $ isDecimalIntegerStringType = $ type ->isDecimalIntegerStringType ();
116- $ result = $ type ->isString ()->and ($ this ->inverse ? $ isDecimalIntegerStringType ->negate () : $ isDecimalIntegerStringType );
115+ $ isDecimalIntegerString = $ type ->isDecimalIntegerString ();
116+ $ result = $ type ->isString ()->and ($ this ->inverse ? $ isDecimalIntegerString ->negate () : $ isDecimalIntegerString );
117117
118118 return new IsSuperTypeOfResult ($ result , []);
119119 }
@@ -128,7 +128,7 @@ public function isSubTypeOf(Type $otherType): IsSuperTypeOfResult
128128 return IsSuperTypeOfResult::createYes ();
129129 }
130130
131- $ otherTypeResult = $ otherType ->isString ()->and ($ this ->inverse ? $ otherType ->isDecimalIntegerStringType ()->negate () : $ otherType ->isDecimalIntegerStringType ());
131+ $ otherTypeResult = $ otherType ->isString ()->and ($ this ->inverse ? $ otherType ->isDecimalIntegerString ()->negate () : $ otherType ->isDecimalIntegerString ());
132132
133133 return new IsSuperTypeOfResult (
134134 $ otherTypeResult ->and ($ otherType ->equals ($ this ) ? TrinaryLogic::createYes () : TrinaryLogic::createMaybe ()),
@@ -335,7 +335,7 @@ public function isNumericString(): TrinaryLogic
335335 return $ this ->inverse ? TrinaryLogic::createMaybe () : TrinaryLogic::createYes ();
336336 }
337337
338- public function isDecimalIntegerStringType (): TrinaryLogic
338+ public function isDecimalIntegerString (): TrinaryLogic
339339 {
340340 return TrinaryLogic::createFromBoolean (!$ this ->inverse );
341341 }
@@ -398,10 +398,10 @@ public function looseCompare(Type $type, PhpVersion $phpVersion): BooleanType
398398
399399 if ($ type ->isString ()->yes ()) {
400400 if ($ this ->inverse ) {
401- if ($ type ->isDecimalIntegerStringType ()->yes ()) {
401+ if ($ type ->isDecimalIntegerString ()->yes ()) {
402402 return new ConstantBooleanType (false );
403403 }
404- } elseif ($ type ->isDecimalIntegerStringType ()->no ()) {
404+ } elseif ($ type ->isDecimalIntegerString ()->no ()) {
405405 return new ConstantBooleanType (false );
406406 }
407407 }
0 commit comments