Comments (2)
It seems the warning goes away if the callback signature is changed from function ($pages
to function (array $pages
. That's probably doable in most cases, though sometimes one needs to discard unknown/falsy values first.
In any case, it seems clear that $pages
is "changed within the loop", regardless of whether it is believed to be an array or not.
from phan.
Related Issues (20)
- Crash on str_replace
- PhanImpossibleTypeComparison after using ternary on property
- PhanEnumCannotImplement Classlike SurveyAnswerInterface cannot implement \BackedEnum in php 8.1+
- Possibly empty array with non-null values reported as non-empty-array<string,string>(real=non-empty-array<string,?string> HOT 1
- UnionTypeVisitor::analyzeProp does not respect should_catch_issue_exception HOT 1
- Dead code detection not recognizing types included within union types for parameters, only recognizes first class defined in a union type
- PHP's SID constant is unknown to phan
- False Positive: PhanPluginMixedKeyNoKey Should not mix array entries
- Phan incorrectly infers property type of newly created stdClass based on other assignments of properties on non-related stdClass instances
- Fix RedisCluster setOption/getOption signatures in FunctionSignatureMap.php
- PHP 8.2 and #[\SensitiveParameter] not handled by phan HOT 1
- Feature: `compact` - Test for possibly undefined variable - Notice from 7.3.0 and up./
- False positive assuming null static::CONST is assigned while protected by test.
- Crash PreferNamespaceUsePlugin\Fixers.php
- DeprecateAliasPlugin - checkdnsrr replace by dns_check_record alias? HOT 1
- Implement Gitlab Issue Printer for CI
- Feature Request: Add plugin to warn when match statement has uncovered enum cases HOT 1
- False positive: ini_set error when value is not string
- Infer return type of array_chunk more accurately
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from phan.