Skip to content

Commit 36ac734

Browse files
committed
[BCB] Remove ConstantArrayType::getNextAutoIndex()
1 parent 9663f0e commit 36ac734

File tree

2 files changed

+3
-5
lines changed

2 files changed

+3
-5
lines changed

UPGRADING.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -247,3 +247,4 @@ Instead of `PHPStanTestCase::createBroker()`, call `PHPStanTestCase::createRefle
247247
* Rename `Type::isClassStringType()` to `Type::isClassString()`
248248
* Remove `Scope::isSpecified()`, use `hasExpressionType()` instead
249249
* Remove `ConstantArrayType::isEmpty()`, use `isIterableAtLeastOnce()->no()` instead
250+
* Remove `ConstantArrayType::getNextAutoIndex()`

src/Type/Constant/ConstantArrayType.php

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -144,10 +144,7 @@ public function getNextAutoIndexes(): array
144144
return $this->nextAutoIndexes;
145145
}
146146

147-
/**
148-
* @deprecated
149-
*/
150-
public function getNextAutoIndex(): int
147+
private function getNextAutoIndex(): int
151148
{
152149
return $this->nextAutoIndexes[count($this->nextAutoIndexes) - 1];
153150
}
@@ -1076,7 +1073,7 @@ private function removeLastElements(int $length): self
10761073
array_pop($valueTypes);
10771074
$nextAutoindex = $removedKeyType instanceof ConstantIntegerType
10781075
? $removedKeyType->getValue()
1079-
: $this->getNextAutoIndex(); // @phpstan-ignore method.deprecated
1076+
: $this->getNextAutoIndex();
10801077
continue;
10811078
}
10821079

0 commit comments

Comments
 (0)