Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: aim to not rely on internal array pointer but use array_key_first #7613

Merged
merged 1 commit into from Dec 24, 2023

Conversation

keradus
Copy link
Member

@keradus keradus commented Dec 22, 2023

No description provided.

@keradus keradus marked this pull request as ready for review December 22, 2023 20:32
@coveralls
Copy link

Coverage Status

coverage: 94.795%. remained the same
when pulling ecd4bbd on keradus:chore_array
into 8058b05 on PHP-CS-Fixer:master.

Copy link
Member

@Wirone Wirone left a comment

Choose a reason for hiding this comment

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

key and array_key_first are not the same, it seems like all of the usages were using arrays with untouched pointer 🤔. As long as it works as expected... 👍.

@keradus
Copy link
Member Author

keradus commented Dec 24, 2023

key and array_key_first are not the same

exactly. but for majority of cases, we were not interested to understood the current internal array pointer and eager to grab first element.

unfortunately, there are few cases of key usage that rely on that pointer, that I left untouched.

@keradus keradus merged commit 968e789 into PHP-CS-Fixer:master Dec 24, 2023
25 checks passed
@keradus keradus deleted the chore_array branch December 24, 2023 12:15
danog pushed a commit to zoonru/PHP-CS-Fixer that referenced this pull request Feb 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants