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

Make remaining function signature maps for get_headers consistent #3273

Closed
TysonAndre opened this issue Sep 16, 2019 · 0 comments
Closed

Make remaining function signature maps for get_headers consistent #3273

TysonAndre opened this issue Sep 16, 2019 · 0 comments
Assignees
Labels
enhancement This improves the quality of Phan's analysis of a codebase

Comments

@TysonAndre
Copy link
Member

get_headers can have string keys, depending on $format.
Make sure that static analysis catches these mismatches first.

src/Phan/Language/Internal/FunctionSignatureMap_php71_delta.php
23:    'get_headers' => ['array|false', 'url'=>'string', 'format='=>'int', 'context='=>'resource'],
44:    'get_headers' => ['array|false', 'url'=>'string', 'format='=>'int'],
src/Phan/Language/Internal/FunctionSignatureMapReal.php
304:'get_headers' => 'array<int,array>|array<int,string>|false',

src/Phan/Language/Internal/FunctionSignatureMapReal_php73.php
299:'get_headers' => '?array<int,array>|?array<int,string>|?false',

Compare with:

src/Phan/Language/Internal/FunctionSignatureMap.php
3689:'get_headers' => ['array<int|string,array|string>|false', 'url'=>'string', 'format='=>'int', 'context='=>'resource'],
15694:'xdebug_get_headers' => ['array'],

See #1821

@TysonAndre TysonAndre added the enhancement This improves the quality of Phan's analysis of a codebase label Sep 16, 2019
@TysonAndre TysonAndre self-assigned this Sep 16, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement This improves the quality of Phan's analysis of a codebase
Projects
None yet
Development

No branches or pull requests

1 participant