| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/voltron/pull_requests/show/:user_id/:repository/:id/pull_request_layout(.:format) |
| route-controller | voltron_pull_requests_fragments |
| route-action | pull_request_layout |
| fetch-nonce | v2:e6102b13-8ffb-4b8c-b0ae-6b1023def49c |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | B702:1D8AA1:1DA9332:26EF2B2:6B01533A |
| html-safe-nonce | 72d17d36dc6317c2763574002920c36f3c29336e0b6c36c7d61595549108c327 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCNzAyOjFEOEFBMToxREE5MzMyOjI2RUYyQjI6NkIwMTUzM0EiLCJ2aXNpdG9yX2lkIjoiNzE3Mjg2MDAwNzY0MDI5MDEwNiIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | d210e9c0908b2d1034817d09edd1c6c5d128380e28d475784461a22666c4d0de |
| hovercard-subject-tag | pull_request:4116115975 |
| github-keyboard-shortcuts | repository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | ///voltron/pull_requests_fragments/pull_request_layout |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/voltron/pull_requests/show/phpstan/phpstan-src/6094/pull_request_layout |
| twitter:image | https://opengraph.githubassets.com/b1692ce0eb530c3ebc5913d893d461801e278b7c5cfe20bbe5c5aab881094330/phpstan/phpstan-src/pull/6094 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/b1692ce0eb530c3ebc5913d893d461801e278b7c5cfe20bbe5c5aab881094330/phpstan/phpstan-src/pull/6094 |
| og:image:alt | Closes phpstan/phpstan#13312
/** @param list<mixed> $arr */
function foo(array $arr): void {
foreach ($arr as $v) {
bar($arr);
}
}
/** @param non-empty-list<mixed> $arr */
function... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | zonuexe |
| hostname | github.com |
| expected-hostname | github.com |
| None | cc5dfdd32f62ebd3223cab3af3aa2b268d3605218237326a48a99d1efd89495c |
| turbo-cache-control | no-cache |
| go-import | github.com/phpstan/phpstan-src git https://github.com/phpstan/phpstan-src.git |
| octolytics-dimension-user_id | 16435710 |
| octolytics-dimension-user_login | phpstan |
| octolytics-dimension-repository_id | 219334214 |
| octolytics-dimension-repository_nwo | phpstan/phpstan-src |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 219334214 |
| octolytics-dimension-repository_network_root_nwo | phpstan/phpstan-src |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 8c77c9e8439031ad54c75a250694842892f693e1 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | pull-requests |
| Skip to content | https://github.com/phpstan/phpstan-src/pull/6094#start-of-content |
| https://github.com/ |
| Sign in | https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fphpstan%2Fphpstan-src%2Fpull%2F6094 |
| GitHubRepository hosting, code review, and collaboration | https://github.com/platform |
| CopilotAI coding agent for tasks, projects, and automated work | https://github.com/features/copilot |
| ActionsCI/CD and automation | https://github.com/features/actions |
| Code QualityQuality analysis, fixes, and enforcement | https://github.com/features/code-quality |
| CodespacesCloud development environments | https://github.com/features/codespaces |
| Code SecurityVulnerability detection and remediation | https://github.com/security/advanced-security/code-security |
| Secret ProtectionSecret scanning and leak prevention | https://github.com/security/advanced-security/secret-protection |
| All Features | https://github.com/features |
| Documentation | https://docs.github.com/en |
| Training | https://learn.github.com/skills |
| Certifications | https://learn.github.com/credentials |
| Build with Copilot | https://github.com/features/ai |
| Customize Copilot | https://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview |
| Integrations | https://github.com/marketplace |
| Trending repos | https://github.com/trending |
| GitHub Sponsors | https://github.com/open-source/sponsors |
| Developer articles | https://github.com/resources/articles |
| ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place. | https://github.blog/changelog/ |
| Enterprises | https://github.com/enterprise |
| Team | https://github.com/team |
| Startups | https://github.com/enterprise/startups |
| Nonprofits | https://github.com/solutions/industry/nonprofits |
| Healthcare | https://github.com/solutions/industry/healthcare |
| Financial services | https://github.com/solutions/industry/financial-services |
| Manufacturing | https://github.com/solutions/industry/manufacturing |
| Government | https://github.com/solutions/industry/government |
| See all industries | https://github.com/solutions/industry |
| Why GitHub | https://github.com/why-github |
| Customer Stories | https://github.com/customer-stories |
| Business insights | https://github.com/solutions/executive-insights |
| Trust Center | https://github.com/trust-center |
| GitHub Advanced SecurityEnterprise-grade code security | https://github.com/security/advanced-security |
| Copilot for businessEnterprise-grade AI features | https://github.com/features/copilot/copilot-business |
| Premium SupportEnterprise-grade 24/7 support | https://github.com/enterprise/premium-support |
| Documentation | https://docs.github.com/en |
| Resource center | https://github.com/resources |
| Blog | https://github.blog/ |
| Events & webinars | https://github.com/resources/events |
| Community Forum | https://github.com/orgs/community/discussions |
| Customer Stories | https://github.com/customer-stories |
| Integrations | https://github.com/marketplace |
| Customer support | https://help.github.com/ |
| Training | https://learn.github.com/skills |
| GitHub Status | https://www.githubstatus.com/ |
| About | https://github.com/about |
| Partners | https://github.com/partners |
| Changelog | https://github.blog/changelog/ |
| GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub. | https://githubuniverse.com/ |
| Pricing | https://github.com/pricing |
| Sign in | https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fphpstan%2Fphpstan-src%2Fpull%2F6094 |
| Sign up | https://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fpull_requests_fragments%2Fpull_request_layout&source=header-repo&source_repo=phpstan%2Fphpstan-src |
| Reload | https://github.com/phpstan/phpstan-src/pull/6094 |
| Reload | https://github.com/phpstan/phpstan-src/pull/6094 |
| Reload | https://github.com/phpstan/phpstan-src/pull/6094 |
| phpstan | https://github.com/phpstan |
| phpstan-src | https://github.com/phpstan/phpstan-src |
| Code | https://github.com/phpstan/phpstan-src |
| Pull requests175 (175) | https://github.com/phpstan/phpstan-src/pulls |
| Actions | https://github.com/phpstan/phpstan-src/actions |
| Security and quality | https://github.com/phpstan/phpstan-src/security |
| Insights | https://github.com/phpstan/phpstan-src/insights |
| https://github.com/phpstan/phpstan-src |
| zonuexe | https://github.com/zonuexe |
| phpstan:2.3.x | https://github.com/phpstan/phpstan-src/tree/2.3.x |
| zonuexe:foreach-non-empty-narrowing | https://github.com/zonuexe/phpstan-src/tree/foreach-non-empty-narrowing |
| Conversation | https://github.com/phpstan/phpstan-src/pull/6094 |
| Commits1 (1) | https://github.com/phpstan/phpstan-src/pull/6094/commits |
| Checks | https://github.com/phpstan/phpstan-src/pull/6094/checks |
| Files changed | https://github.com/phpstan/phpstan-src/pull/6094/files |
| Narrow foreach body to non-empty regardless of polluteScopeWithAlwaysIterableForeach | https://github.com/phpstan/phpstan-src/pull/6094#top |
| zonuexe | https://github.com/zonuexe |
| phpstan:2.3.x | https://github.com/phpstan/phpstan-src/tree/2.3.x |
| zonuexe:foreach-non-empty-narrowing | https://github.com/zonuexe/phpstan-src/tree/foreach-non-empty-narrowing |
|
| https://github.com/zonuexe |
| zonuexe | https://github.com/zonuexe |
| Jul 23, 2026 | https://github.com/phpstan/phpstan-src/pull/6094#issue-4958342807 |
| Please reload this page | https://github.com/phpstan/phpstan-src/pull/6094 |
| phpstan/phpstan#13312 | https://github.com/phpstan/phpstan/issues/13312 |
| Please reload this page | https://github.com/phpstan/phpstan-src/pull/6094 |
| https://github.com/zonuexe |
| zonuexe | https://github.com/zonuexe |
| force-pushed | https://github.com/phpstan/phpstan-src/compare/568511a707e20d64913e2d877154c5490e2a6bdf..8aa4092f44cec20fd6d1274dd2aa1fe0df2d7a6e |
| 568511a | https://github.com/phpstan/phpstan-src/commit/568511a707e20d64913e2d877154c5490e2a6bdf |
| 8aa4092 | https://github.com/phpstan/phpstan-src/commit/8aa4092f44cec20fd6d1274dd2aa1fe0df2d7a6e |
|
Compare
| https://github.com/phpstan/phpstan-src/compare/568511a707e20d64913e2d877154c5490e2a6bdf..8aa4092f44cec20fd6d1274dd2aa1fe0df2d7a6e |
| July 23, 2026 13:07 | https://github.com/phpstan/phpstan-src/pull/6094#event-28383206078 |
| https://github.com/staabm |
| staabm | https://github.com/staabm |
|
Jul 25, 2026
| https://github.com/phpstan/phpstan-src/pull/6094#pullrequestreview-4778820500 |
|
View reviewed changes
| https://github.com/phpstan/phpstan-src/pull/6094/files |
| src/Command/AnalyseCommand.php | https://github.com/phpstan/phpstan-src/pull/6094/files#diff-c1bcb5233e8b4a0075e7a3b16d970ed59df09fc2d3e009a741e1af20b8902220 |
| Please reload this page | https://github.com/phpstan/phpstan-src/pull/6094 |
| https://github.com/zonuexe |
| zonuexe | https://github.com/zonuexe |
| July 25, 2026 14:12 | https://github.com/phpstan/phpstan-src/pull/6094#event-28476512229 |
| https://github.com/zonuexe |
| zonuexe | https://github.com/zonuexe |
| force-pushed | https://github.com/phpstan/phpstan-src/compare/8aa4092f44cec20fd6d1274dd2aa1fe0df2d7a6e..b5a6e6ef986b0a5bef7e5653ed1eda765152f90b |
| 8aa4092 | https://github.com/phpstan/phpstan-src/commit/8aa4092f44cec20fd6d1274dd2aa1fe0df2d7a6e |
| b5a6e6e | https://github.com/phpstan/phpstan-src/commit/b5a6e6ef986b0a5bef7e5653ed1eda765152f90b |
|
Compare
| https://github.com/phpstan/phpstan-src/compare/8aa4092f44cec20fd6d1274dd2aa1fe0df2d7a6e..b5a6e6ef986b0a5bef7e5653ed1eda765152f90b |
| July 25, 2026 14:13 | https://github.com/phpstan/phpstan-src/pull/6094#event-28476539655 |
| https://github.com/zonuexe |
| zonuexe | https://github.com/zonuexe |
| July 25, 2026 14:33 | https://github.com/phpstan/phpstan-src/pull/6094#event-28476849926 |
| https://github.com/phpstan-bot |
| phpstan-bot | https://github.com/phpstan-bot |
| Jul 25, 2026 | https://github.com/phpstan/phpstan-src/pull/6094#issuecomment-5078867570 |
| Please reload this page | https://github.com/phpstan/phpstan-src/pull/6094 |
| https://github.com/staabm |
| staabm | https://github.com/staabm |
|
Jul 25, 2026
| https://github.com/phpstan/phpstan-src/pull/6094#pullrequestreview-4779616829 |
|
View reviewed changes
| https://github.com/phpstan/phpstan-src/pull/6094/files |
| src/Type/UnionType.php | https://github.com/phpstan/phpstan-src/pull/6094/files#diff-e1d93828e2e8e75c5ce4035f5aa4a084d852c2b06738c4c4f8186aa140086ba1 |
| staabm | https://github.com/staabm |
| Jul 25, 2026 | https://github.com/phpstan/phpstan-src/pull/6094#discussion_r3650527072 |
| Learn more | https://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment |
| Please reload this page | https://github.com/phpstan/phpstan-src/pull/6094 |
| zonuexe | https://github.com/zonuexe |
| Jul 25, 2026 | https://github.com/phpstan/phpstan-src/pull/6094#discussion_r3650648962 |
| Learn more | https://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment |
| Please reload this page | https://github.com/phpstan/phpstan-src/pull/6094 |
| staabm | https://github.com/staabm |
| Jul 25, 2026 | https://github.com/phpstan/phpstan-src/pull/6094#discussion_r3650826302 |
| Learn more | https://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment |
| Please reload this page | https://github.com/phpstan/phpstan-src/pull/6094 |
| zonuexe | https://github.com/zonuexe |
| Jul 26, 2026 | https://github.com/phpstan/phpstan-src/pull/6094#discussion_r3651449737 |
| Learn more | https://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment |
| Please reload this page | https://github.com/phpstan/phpstan-src/pull/6094 |
| staabm | https://github.com/staabm |
| Jul 26, 2026 | https://github.com/phpstan/phpstan-src/pull/6094#discussion_r3651808207 |
| Learn more | https://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment |
| Please reload this page | https://github.com/phpstan/phpstan-src/pull/6094 |
| https://github.com/zonuexe |
| zonuexe | https://github.com/zonuexe |
| force-pushed | https://github.com/phpstan/phpstan-src/compare/b5a6e6ef986b0a5bef7e5653ed1eda765152f90b..54ac5fdaa30163810a04bb038975f0fd04d5a7ce |
| b5a6e6e | https://github.com/phpstan/phpstan-src/commit/b5a6e6ef986b0a5bef7e5653ed1eda765152f90b |
| 54ac5fd | https://github.com/phpstan/phpstan-src/commit/54ac5fdaa30163810a04bb038975f0fd04d5a7ce |
|
Compare
| https://github.com/phpstan/phpstan-src/compare/b5a6e6ef986b0a5bef7e5653ed1eda765152f90b..54ac5fdaa30163810a04bb038975f0fd04d5a7ce |
| July 25, 2026 17:34 | https://github.com/phpstan/phpstan-src/pull/6094#event-28480286274 |
| https://github.com/staabm |
| staabm | https://github.com/staabm |
|
Jul 25, 2026
| https://github.com/phpstan/phpstan-src/pull/6094#pullrequestreview-4779972871 |
|
View reviewed changes
| https://github.com/phpstan/phpstan-src/pull/6094/files |
| src/Analyser/NodeScopeResolver.php | https://github.com/phpstan/phpstan-src/pull/6094/files#diff-0c3f50d118357d9cb6d6f4d0eade75b83797d57056ff3b9c58ec881a13eaa6fe |
| Please reload this page | https://github.com/phpstan/phpstan-src/pull/6094 |
| https://github.com/staabm |
| staabm | https://github.com/staabm |
|
Jul 25, 2026
| https://github.com/phpstan/phpstan-src/pull/6094#pullrequestreview-4779973501 |
|
View reviewed changes
| https://github.com/phpstan/phpstan-src/pull/6094/files |
| src/Analyser/NodeScopeResolver.php | https://github.com/phpstan/phpstan-src/pull/6094/files#diff-0c3f50d118357d9cb6d6f4d0eade75b83797d57056ff3b9c58ec881a13eaa6fe |
| Please reload this page | https://github.com/phpstan/phpstan-src/pull/6094 |
| https://github.com/staabm |
| staabm | https://github.com/staabm |
|
Jul 25, 2026
| https://github.com/phpstan/phpstan-src/pull/6094#pullrequestreview-4779974959 |
|
View reviewed changes
| https://github.com/phpstan/phpstan-src/pull/6094/files |
| tests/PHPStan/Analyser/bug-13312-no-pollute.neon | https://github.com/phpstan/phpstan-src/pull/6094/files#diff-8756ce39e3f10a9beb690c1b68968371b6cf82f77c4e9e2da5b0db66960c1c92 |
| staabm | https://github.com/staabm |
| Jul 25, 2026 | https://github.com/phpstan/phpstan-src/pull/6094#discussion_r3650834864 |
| Learn more | https://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment |
| Please reload this page | https://github.com/phpstan/phpstan-src/pull/6094 |
| zonuexe | https://github.com/zonuexe |
| Jul 26, 2026 | https://github.com/phpstan/phpstan-src/pull/6094#discussion_r3651449824 |
| Learn more | https://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment |
| Please reload this page | https://github.com/phpstan/phpstan-src/pull/6094 |
| https://github.com/zonuexe |
| zonuexe | https://github.com/zonuexe |
| July 26, 2026 01:27 | https://github.com/phpstan/phpstan-src/pull/6094#event-28488359629 |
| https://github.com/zonuexe |
| zonuexe | https://github.com/zonuexe |
| force-pushed | https://github.com/phpstan/phpstan-src/compare/54ac5fdaa30163810a04bb038975f0fd04d5a7ce..3af0acb55db7791174ed689edc64fba3816e0c82 |
| 54ac5fd | https://github.com/phpstan/phpstan-src/commit/54ac5fdaa30163810a04bb038975f0fd04d5a7ce |
| 3af0acb | https://github.com/phpstan/phpstan-src/commit/3af0acb55db7791174ed689edc64fba3816e0c82 |
|
Compare
| https://github.com/phpstan/phpstan-src/compare/54ac5fdaa30163810a04bb038975f0fd04d5a7ce..3af0acb55db7791174ed689edc64fba3816e0c82 |
| July 26, 2026 01:34 | https://github.com/phpstan/phpstan-src/pull/6094#event-28488461512 |
| https://github.com/staabm |
| staabm | https://github.com/staabm |
| force-pushed | https://github.com/phpstan/phpstan-src/compare/3af0acb55db7791174ed689edc64fba3816e0c82..c3389dc559c904771349dc3d3208e949e83391f0 |
| 3af0acb | https://github.com/phpstan/phpstan-src/commit/3af0acb55db7791174ed689edc64fba3816e0c82 |
| c3389dc | https://github.com/phpstan/phpstan-src/commit/c3389dc559c904771349dc3d3208e949e83391f0 |
|
Compare
| https://github.com/phpstan/phpstan-src/compare/3af0acb55db7791174ed689edc64fba3816e0c82..c3389dc559c904771349dc3d3208e949e83391f0 |
| July 26, 2026 05:16 | https://github.com/phpstan/phpstan-src/pull/6094#event-28492004934 |
| https://github.com/zonuexe |
| zonuexe | https://github.com/zonuexe |
| force-pushed | https://github.com/phpstan/phpstan-src/compare/7cfb7eadd308b8f7f7c3e36290fef9304fb7581f..eb6fb26db20899a01238eac70659f715239f21bd |
| 7cfb7ea | https://github.com/phpstan/phpstan-src/commit/7cfb7eadd308b8f7f7c3e36290fef9304fb7581f |
| eb6fb26 | https://github.com/phpstan/phpstan-src/commit/eb6fb26db20899a01238eac70659f715239f21bd |
|
Compare
| https://github.com/phpstan/phpstan-src/compare/7cfb7eadd308b8f7f7c3e36290fef9304fb7581f..eb6fb26db20899a01238eac70659f715239f21bd |
| August 1, 2026 09:09 | https://github.com/phpstan/phpstan-src/pull/6094#event-28814691702 |
|
| https://github.com/zonuexe |
|
| https://github.com/ondrejmirtes |
| Narrow foreach body to non-empty behind an opt-in toggle | https://github.com/phpstan/phpstan-src/pull/6094/commits/bef3992a9bed8fe1c5539523976733add9f52190 |
| bef3992 | https://github.com/phpstan/phpstan-src/pull/6094/commits/bef3992a9bed8fe1c5539523976733add9f52190 |
| phpstan/phpstan#13312 | https://github.com/phpstan/phpstan/issues/13312 |
| https://ampcode.com/threads/T-01a19219-6260-7460-a52b-a418f709e4bf | https://ampcode.com/threads/T-01a19219-6260-7460-a52b-a418f709e4bf |
| https://github.com/ondrejmirtes |
| ondrejmirtes | https://github.com/ondrejmirtes |
| force-pushed | https://github.com/phpstan/phpstan-src/compare/eb6fb26db20899a01238eac70659f715239f21bd..bef3992a9bed8fe1c5539523976733add9f52190 |
| eb6fb26 | https://github.com/phpstan/phpstan-src/commit/eb6fb26db20899a01238eac70659f715239f21bd |
| bef3992 | https://github.com/phpstan/phpstan-src/commit/bef3992a9bed8fe1c5539523976733add9f52190 |
|
Compare
| https://github.com/phpstan/phpstan-src/compare/eb6fb26db20899a01238eac70659f715239f21bd..bef3992a9bed8fe1c5539523976733add9f52190 |
| October 31, 2026 13:34 | https://github.com/phpstan/phpstan-src/pull/6094#event-34773638549 |
| https://github.com/ondrejmirtes |
| ondrejmirtes | https://github.com/ondrejmirtes |
| October 31, 2026 13:34 | https://github.com/phpstan/phpstan-src/pull/6094#event-34773639899 |
| https://github.co/hiddenchars |
| https://github.com/phpstan/phpstan-src/pull/{{ revealButtonHref }} |
| Sign up for free | https://github.com/join?source=comment-repo |
| Sign in to comment | https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fphpstan%2Fphpstan-src%2Fpull%2F6094 |
|
| https://github.com/staabm |
|
staabm
| https://github.com/staabm |
|
| https://github.com/phpstan/phpstan-src/pull/6094/files/54ac5fdaa30163810a04bb038975f0fd04d5a7ce |
| Please reload this page | https://github.com/phpstan/phpstan-src/pull/6094 |
|
Narrow list to non-empty-list inside foreach
| https://github.com/phpstan/phpstan/issues/13312 |
| Please reload this page | https://github.com/phpstan/phpstan-src/pull/6094 |
|
| https://github.com/zonuexe |
|
| https://github.com/phpstan-bot |
|
| https://github.com/staabm |
|
| https://github.com |
| Terms | https://docs.github.com/site-policy/github-terms/github-terms-of-service |
| Privacy | https://docs.github.com/site-policy/privacy-policies/github-privacy-statement |
| Security | https://github.com/security |
| Status | https://www.githubstatus.com/ |
| Community | https://github.community/ |
| Docs | https://docs.github.com/ |
| Contact | https://support.github.com?tags=dotcom-footer |