File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed
Expand file tree Collapse file tree 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
366366 public function hasOffsetValueType (Type $ offsetType ): TrinaryLogic
367367 {
368368 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 );
370371 return $ strLenType ->isSuperTypeOf ($ offsetType );
371372 }
372373
@@ -376,7 +377,8 @@ public function hasOffsetValueType(Type $offsetType): TrinaryLogic
376377 public function getOffsetValueType (Type $ offsetType ): Type
377378 {
378379 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 );
380382
381383 if ($ offsetType instanceof ConstantIntegerType) {
382384 if ($ strLenType ->isSuperTypeOf ($ offsetType )->yes ()) {
You can’t perform that action at this time.
0 commit comments