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

Use getSingleAtomic() instead of array_values(getAtomicTypes())[0]. #7134

Merged
merged 2 commits into from
Dec 11, 2021

Conversation

AndrolGenhald
Copy link
Collaborator

No description provided.

@orklah
Copy link
Collaborator

orklah commented Dec 11, 2021

Oh, nice. I think we also have some reset() and array_pop/array_unshift that does that too

@orklah orklah added the release:internal The PR will be included in 'Internal changes' section of the release notes label Dec 11, 2021
@AndrolGenhald
Copy link
Collaborator Author

AndrolGenhald commented Dec 11, 2021

Oh, nice. I think we also have some reset() and array_pop/array_unshift that does that too

I don't think so. If there are any they have to be assigned to a variable first since those take the argument by reference, so it's a lot harder to find.

Grepping (?:reset|array_(?:values|pop|unshift)).*\[0\] only turns up 26 results, and I don't think any of them are relevant.

@orklah
Copy link
Collaborator

orklah commented Dec 11, 2021

Well, I usually use regex for that kind of searches.
Try things like
array_shift\(\$.+type
array_pop\(\$.+type
reset\(\$.+type

There's quite a few :)

But no worries if you don't want to do those, we'll do that later

@AndrolGenhald
Copy link
Collaborator Author

Actually there is one, I'll fix it in a minute.

@orklah
Copy link
Collaborator

orklah commented Dec 11, 2021

Thanks!

@orklah orklah merged commit cc2e667 into vimeo:master Dec 11, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release:internal The PR will be included in 'Internal changes' section of the release notes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants