Skip to content

Commit d5a0ddb

Browse files
committed
[BCB] Removed methods from ConstantArrayType - getFirst*Type and getLast*Type
1 parent 36ac734 commit d5a0ddb

File tree

2 files changed

+2
-24
lines changed

2 files changed

+2
-24
lines changed

UPGRADING.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -248,3 +248,5 @@ Instead of `PHPStanTestCase::createBroker()`, call `PHPStanTestCase::createRefle
248248
* Remove `Scope::isSpecified()`, use `hasExpressionType()` instead
249249
* Remove `ConstantArrayType::isEmpty()`, use `isIterableAtLeastOnce()->no()` instead
250250
* Remove `ConstantArrayType::getNextAutoIndex()`
251+
* Removed methods from `ConstantArrayType` - `getFirst*Type` and `getLast*Type`
252+
* Use `getFirstIterable*Type` and `getLastIterable*Type` instead

src/Type/Constant/ConstantArrayType.php

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -242,18 +242,6 @@ public function getKeyTypes(): array
242242
return $this->keyTypes;
243243
}
244244

245-
/** @deprecated Use getFirstIterableKeyType() instead */
246-
public function getFirstKeyType(): Type
247-
{
248-
return $this->getFirstIterableKeyType();
249-
}
250-
251-
/** @deprecated Use getLastIterableKeyType() instead */
252-
public function getLastKeyType(): Type
253-
{
254-
return $this->getLastIterableKeyType();
255-
}
256-
257245
/**
258246
* @return array<int, Type>
259247
*/
@@ -262,18 +250,6 @@ public function getValueTypes(): array
262250
return $this->valueTypes;
263251
}
264252

265-
/** @deprecated Use getFirstIterableValueType() instead */
266-
public function getFirstValueType(): Type
267-
{
268-
return $this->getFirstIterableValueType();
269-
}
270-
271-
/** @deprecated Use getLastIterableValueType() instead */
272-
public function getLastValueType(): Type
273-
{
274-
return $this->getLastIterableValueType();
275-
}
276-
277253
public function isOptionalKey(int $i): bool
278254
{
279255
return in_array($i, $this->optionalKeys, true);

0 commit comments

Comments
 (0)