Skip to content

Commit 73a63f1

Browse files
committed
[BCB] Remove ArrayType::count()
1 parent 248ce53 commit 73a63f1

File tree

3 files changed

+1
-12
lines changed

3 files changed

+1
-12
lines changed

UPGRADING.md

+1
Original file line numberDiff line numberDiff line change
@@ -233,3 +233,4 @@ Instead of `PHPStanTestCase::createBroker()`, call `PHPStanTestCase::createRefle
233233
* `CompoundType::isGreaterThan()`, `CompoundType::isGreaterThanOrEqual()` now require [`PhpVersion`](https://apiref.phpstan.org/2.0.x/PHPStan.Php.PhpVersion.html) as argument.
234234
* Removed `ReflectionProvider::supportsAnonymousClasses()` (all reflection providers support anonymous classes)
235235
* Remove `ArrayType::generalizeKeys()`
236+
* Remove `ArrayType::count()`

src/Type/ArrayType.php

-6
Original file line numberDiff line numberDiff line change
@@ -638,12 +638,6 @@ public function toArrayKey(): Type
638638
return new ErrorType();
639639
}
640640

641-
/** @deprecated Use getArraySize() instead */
642-
public function count(): Type
643-
{
644-
return $this->getArraySize();
645-
}
646-
647641
/** @deprecated Use $offsetType->toArrayKey() instead */
648642
public static function castToArrayKeyType(Type $offsetType): Type
649643
{

src/Type/Constant/ConstantArrayType.php

-6
Original file line numberDiff line numberDiff line change
@@ -1421,12 +1421,6 @@ private function getKeysOrValuesArray(array $types): self
14211421
return new self($keyTypes, $valueTypes, $autoIndexes, $optionalKeys, TrinaryLogic::createYes());
14221422
}
14231423

1424-
/** @deprecated Use getArraySize() instead */
1425-
public function count(): Type
1426-
{
1427-
return $this->getArraySize();
1428-
}
1429-
14301424
public function describe(VerbosityLevel $level): string
14311425
{
14321426
$describeValue = function (bool $truncate) use ($level): string {

0 commit comments

Comments
 (0)