Skip to content

Make array_combine() generic #3351

@b1rdex

Description

@b1rdex

https://phpstan.org/r/59427afd-8dc6-4b14-8d40-2c52b5fc8d34

Currently, array_combine produces array|false. It should be enhanced with this:

/**
 * @template TKey
 * @template TValue
 * @param array<TKey> $keys
 * @param array<TValue> $values
 *
 * @return array<TKey, TValue>|false
 */
array_combine(array $keys, array $values);

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions