File tree 1 file changed +4
-2
lines changed
1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -366,7 +366,8 @@ public function isUppercaseString(): TrinaryLogic
366
366
public function hasOffsetValueType (Type $ offsetType ): TrinaryLogic
367
367
{
368
368
if ($ offsetType ->isInteger ()->yes ()) {
369
- $ strLenType = IntegerRangeType::fromInterval (-strlen ($ this ->value ), strlen ($ this ->value ) - 1 );
369
+ $ strlen = strlen ($ this ->value );
370
+ $ strLenType = IntegerRangeType::fromInterval (-$ strlen , $ strlen - 1 );
370
371
return $ strLenType ->isSuperTypeOf ($ offsetType );
371
372
}
372
373
@@ -376,7 +377,8 @@ public function hasOffsetValueType(Type $offsetType): TrinaryLogic
376
377
public function getOffsetValueType (Type $ offsetType ): Type
377
378
{
378
379
if ($ offsetType ->isInteger ()->yes ()) {
379
- $ strLenType = IntegerRangeType::fromInterval (-strlen ($ this ->value ), strlen ($ this ->value ) - 1 );
380
+ $ strlen = strlen ($ this ->value );
381
+ $ strLenType = IntegerRangeType::fromInterval (-$ strlen , $ strlen - 1 );
380
382
381
383
if ($ offsetType instanceof ConstantIntegerType) {
382
384
if ($ strLenType ->isSuperTypeOf ($ offsetType )->yes ()) {
You can’t perform that action at this time.
0 commit comments