Skip to content

Commit b9ad2ec

Browse files
committed
[BCB] Remove TypeUtils::getConstantScalars()
1 parent c98dd89 commit b9ad2ec

File tree

2 files changed

+2
-10
lines changed

2 files changed

+2
-10
lines changed

UPGRADING.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -256,4 +256,5 @@ Instead of `PHPStanTestCase::createBroker()`, call `PHPStanTestCase::createRefle
256256
* Remove `TypeUtils::getConstantStrings()`, use [`Type::getConstantStrings()`](https://apiref.phpstan.org/2.0.x/PHPStan.Type.Type.html#_getConstantStrings) instead
257257
* 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)
258258
* Remove `TypeUtils::generalizeType()`, use [`Type::generalize()`](https://apiref.phpstan.org/2.0.x/PHPStan.Type.Type.html#_generalize) instead
259-
* Remove `TypeUtils::getDirectClassNames()`, use [`Type::getObjectClassNames()`](https://apiref.phpstan.org/2.0.x/PHPStan.Type.Type.html#_getObjectClassNames) instead.
259+
* Remove `TypeUtils::getDirectClassNames()`, use [`Type::getObjectClassNames()`](https://apiref.phpstan.org/2.0.x/PHPStan.Type.Type.html#_getObjectClassNames) instead
260+
* Remove `TypeUtils::getConstantScalars()`, use [`Type::isConstantScalarValue()`](https://apiref.phpstan.org/2.0.x/PHPStan.Type.Type.html#_isConstantScalarValue) or [`Type::getConstantScalarTypes()`](https://apiref.phpstan.org/2.0.x/PHPStan.Type.Type.html#_getConstantScalarTypes) instead

src/Type/TypeUtils.php

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -34,15 +34,6 @@ public static function getIntegerRanges(Type $type): array
3434
return self::map(IntegerRangeType::class, $type, false);
3535
}
3636

37-
/**
38-
* @deprecated Use Type::isConstantScalarValue() or Type::getConstantScalarTypes() or Type::getConstantScalarValues()
39-
* @return ConstantScalarType[]
40-
*/
41-
public static function getConstantScalars(Type $type): array
42-
{
43-
return self::map(ConstantScalarType::class, $type, false);
44-
}
45-
4637
/**
4738
* @deprecated Use Type::getEnumCases()
4839
* @return EnumCaseObjectType[]

0 commit comments

Comments
 (0)