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

Rename variables used in map method #3628

Merged
merged 1 commit into from
Jan 14, 2022
Merged

Conversation

alexander-schranz
Copy link
Contributor

As most people (including me) are lazy people to read text and mostly looks just at the code. Using key and value as variable make the map faster to understand which argument is which one :)

Copy link
Contributor

@GromNaN GromNaN left a comment

Choose a reason for hiding this comment

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

The code has the same semantics.

foreach ($array as $k => $v) {
$r[$k] = $arrow($v, $k);
}

@fabpot fabpot changed the base branch from 3.x to 2.x January 14, 2022 11:47
@fabpot
Copy link
Contributor

fabpot commented Jan 14, 2022

Thank you @alexander-schranz.

@fabpot fabpot merged commit 9984a6e into twigphp:2.x Jan 14, 2022
@alexander-schranz alexander-schranz deleted the patch-1 branch January 14, 2022 11:48
fabpot added a commit that referenced this pull request Jan 14, 2022
This PR was merged into the 2.x branch.

Discussion
----------

Fix map example output

@fabpot sorry little error in my #3628 pull request 🙈

Commits
-------

9741173 Fix map example output
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

4 participants