Skip to content

functionMap: ZipArchive::open() returns true on success, int (error c…#253

Merged
ondrejmirtes merged 2 commits intophpstan:masterfrom
pmmp:ziparchive-open
Jun 22, 2020
Merged

functionMap: ZipArchive::open() returns true on success, int (error c…#253
ondrejmirtes merged 2 commits intophpstan:masterfrom
pmmp:ziparchive-open

Conversation

@dktapps
Copy link
Copy Markdown
Contributor

@dktapps dktapps commented Jun 21, 2020

…ode) on failure

@ondrejmirtes
Copy link
Copy Markdown
Member

What about true|ZipArchive::ER_* instead?

@dktapps
Copy link
Copy Markdown
Contributor Author

dktapps commented Jun 21, 2020

that works? Hm, I had no idea.

@ondrejmirtes
Copy link
Copy Markdown
Member

In that case I recommend you to check the documentation: https://phpstan.org/writing-php-code/phpdoc-types#literals-and-constants

the functionMap goes through the same parser.

@dktapps
Copy link
Copy Markdown
Contributor Author

dktapps commented Jun 21, 2020

build failure is bogus, doesn't look related to the PR

@ondrejmirtes ondrejmirtes merged commit c8923b5 into phpstan:master Jun 22, 2020
@ondrejmirtes
Copy link
Copy Markdown
Member

Thank you! Let me know if you find out more function types that could be upgraded with constants like this :)

@dktapps
Copy link
Copy Markdown
Contributor Author

dktapps commented Jun 22, 2020

@ondrejmirtes Sure. I'm not actively scouring for them, but I stumble across them quite often during development :)

@dktapps dktapps deleted the ziparchive-open branch June 22, 2020 10:53
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.

2 participants