Skip to content

Commit 3bfe27e

Browse files
committed
[BCB] Remove TypeUtils::getConstantTypes() and getAnyConstantTypes()
1 parent 9278af7 commit 3bfe27e

File tree

2 files changed

+1
-18
lines changed

2 files changed

+1
-18
lines changed

UPGRADING.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -254,3 +254,4 @@ Instead of `PHPStanTestCase::createBroker()`, call `PHPStanTestCase::createRefle
254254
* Remove `TypeUtils::getArrays()`, use [`Type::getArrays()`](https://apiref.phpstan.org/2.0.x/PHPStan.Type.Type.html#_getArrays) instead
255255
* Remove `TypeUtils::getConstantArrays()`, use [`Type::getConstantArrays()`](https://apiref.phpstan.org/2.0.x/PHPStan.Type.Type.html#_getConstantArrays) instead
256256
* Remove `TypeUtils::getConstantStrings()`, use [`Type::getConstantStrings()`](https://apiref.phpstan.org/2.0.x/PHPStan.Type.Type.html#_getConstantStrings) instead
257+
* Remove `TypeUtils::getConstantTypes()` and `getAnyConstantTypes()`, use [`Type::isConstantValue()`](https://apiref.phpstan.org/2.0.x/PHPStan.Type.Type.html#_isConstantValue) or [`Type::generalize()`](https://apiref.phpstan.org/2.0.x/PHPStan.Type.Type.html#_generalize)

src/Type/TypeUtils.php

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -28,24 +28,6 @@ public static function getConstantIntegers(Type $type): array
2828
return self::map(ConstantIntegerType::class, $type, false);
2929
}
3030

31-
/**
32-
* @deprecated Use Type::isConstantValue() or Type::generalize()
33-
* @return ConstantType[]
34-
*/
35-
public static function getConstantTypes(Type $type): array
36-
{
37-
return self::map(ConstantType::class, $type, false);
38-
}
39-
40-
/**
41-
* @deprecated Use Type::isConstantValue() or Type::generalize()
42-
* @return ConstantType[]
43-
*/
44-
public static function getAnyConstantTypes(Type $type): array
45-
{
46-
return self::map(ConstantType::class, $type, false, false);
47-
}
48-
4931
/**
5032
* @return ArrayType[]
5133
*

0 commit comments

Comments
 (0)