Skip to content

[CodeQuality] Add For to foreach#1419

Merged
TomasVotruba merged 1 commit intomasterfrom
for-to-foreach
May 18, 2019
Merged

[CodeQuality] Add For to foreach#1419
TomasVotruba merged 1 commit intomasterfrom
for-to-foreach

Conversation

@TomasVotruba
Copy link
Copy Markdown
Member

@TomasVotruba TomasVotruba commented May 12, 2019

Closes #1402

-for ($i = 0, $c = count($tokens); $i < $c; ++$i) {
+foreach ($tokens as $i => $token) {
}
-for ($i = 0; $i < count($tokens); ++$i) {
+foreach ($tokens as $i => $token) {
}

Todo

  • rename "get" variables

@TomasVotruba TomasVotruba force-pushed the for-to-foreach branch 2 times, most recently from accb35d to 8386955 Compare May 12, 2019 20:14
@TomasVotruba TomasVotruba changed the title [WIP] [CodeQuality] Add For to foreach [CodeQuality] Add For to foreach May 12, 2019
@TomasVotruba TomasVotruba force-pushed the for-to-foreach branch 2 times, most recently from eef1494 to 4f7d2aa Compare May 18, 2019 22:26
Comment thread config/level/symfony/symfony-code-quality.yaml Outdated
@TomasVotruba TomasVotruba force-pushed the for-to-foreach branch 2 times, most recently from 1f6b0dc to 0bd7118 Compare May 18, 2019 22:52
@TomasVotruba TomasVotruba merged commit ce03100 into master May 18, 2019
@TomasVotruba TomasVotruba deleted the for-to-foreach branch May 18, 2019 23:02
TomasVotruba added a commit that referenced this pull request Dec 7, 2021
rectorphp/rector-src@9d8e5c9 [CodingStyle] Remove UseMessageVariableForSprintfInSymfonyStyleRector as local custom rule (#1419)
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.

[CodeQuality] For to foreach where useful

1 participant