File tree Expand file tree Collapse file tree 3 files changed +4
-2
lines changed Expand file tree Collapse file tree 3 files changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -1609,7 +1609,7 @@ private function resolveType(Expr $node): Type
16091609
16101610 } elseif ($ node instanceof Array_) {
16111611 $ arrayBuilder = ConstantArrayTypeBuilder::createEmpty ();
1612- if (count ($ node ->items ) > 256 ) {
1612+ if (count ($ node ->items ) > ConstantArrayTypeBuilder:: ARRAY_COUNT_LIMIT ) {
16131613 $ arrayBuilder ->degradeToGeneralArray ();
16141614 }
16151615 foreach ($ node ->items as $ arrayItem ) {
Original file line number Diff line number Diff line change 1414class ConstantArrayTypeBuilder
1515{
1616
17+ public const ARRAY_COUNT_LIMIT = 256 ;
18+
1719 /** @var array<int, Type> */
1820 private array $ keyTypes ;
1921
Original file line number Diff line number Diff line change @@ -32,7 +32,7 @@ public static function getTypeFromValue($value): Type
3232 return new ConstantStringType ($ value );
3333 } elseif (is_array ($ value )) {
3434 $ arrayBuilder = ConstantArrayTypeBuilder::createEmpty ();
35- if (count ($ value ) > 256 ) {
35+ if (count ($ value ) > ConstantArrayTypeBuilder:: ARRAY_COUNT_LIMIT ) {
3636 $ arrayBuilder ->degradeToGeneralArray ();
3737 }
3838 foreach ($ value as $ k => $ v ) {
You can’t perform that action at this time.
0 commit comments