phpstan-src icon indicating copy to clipboard operation
phpstan-src copied to clipboard

Add `Type::getKeysArray()` and `Type::getValuesArray()`

Open herndlm opened this issue 3 years ago • 0 comments

low-hanging fruit cleanup / improvement :)

  • fixes ArrayType::getKeysArray() (by using getIterableKeyType() mixed keys are correctly transformed into benevolent unions)
  • simplifies list type creation for array_is_list
  • gives us support for constant array unions for free (instanceof ConstantArrayType be gone! one of the main reasons for all this refactoring)

herndlm avatar Oct 15 '22 20:10 herndlm