We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
version: 5.4.2
Given the following code
class SomeClass { /** * @return array<string,string> */ public function doSomething(): array { /** @var array<string,string> $response */ $response = [ 'result' => 'result', ]; return [ ...$response, 'another' => 'bar', ]; } }
results in
src/SomeClass.php:16 PhanPluginMixedKeyNoKey Should not mix array entries of the form [key => value,] with entries of the form [value,]
Seems that Phan doesn't correctly interpret the effects of the ... operator on <string,string> arrays ?
...
The text was updated successfully, but these errors were encountered:
c13fb60
This problem still exists in the latest version.
class SomeClass { public function doSomething(): array { $response = [ 'result' => 'result', ]; return [ ...$response, // PhanPluginMixedKeyNoKey here 'another' => 'bar', ]; } }
src/example.php:12 PhanPluginMixedKeyNoKey Should not mix array entries of the form [key => value,] with entries of the form [value,].
Probably the spread operator is not understood correctly
Sorry, something went wrong.
No branches or pull requests
version: 5.4.2
Given the following code
results in
src/SomeClass.php:16 PhanPluginMixedKeyNoKey Should not mix array entries of the form [key => value,] with entries of the form [value,]
Seems that Phan doesn't correctly interpret the effects of the
...
operator on <string,string> arrays ?The text was updated successfully, but these errors were encountered: