Skip to content

Conversation

@junaidbinfarooq
Copy link

  • Adds the assertion to assert if all the provided keys exist in the given array

+ Adds the assertion to assert if all the provided keys exist in the given array
/**
* @psalm-pure
*
* @param array<int, int|string> $keys
Copy link
Contributor

@zerkms zerkms Jan 3, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

array<int, int|string> -> list<int|string>?

or

array<int, int|string> -> array<int|string>?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agree, it should be list<int|string>

Copy link
Collaborator

@shadowhand shadowhand left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like this idea, but a couple of things:

  1. It needs to be rebased to current master.
  2. Return type needs to be added.
  3. The type needs to be changed.
  4. The mixin needs to be regenerated with php bin/generate.php.

/**
* @psalm-pure
*
* @param array<int, int|string> $keys
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agree, it should be list<int|string>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants