Skip to content

Add stub for mysqli_stmt properties#700

Merged
ondrejmirtes merged 1 commit intophpstan:masterfrom
morozov:mysqli-stub
Oct 6, 2021
Merged

Add stub for mysqli_stmt properties#700
ondrejmirtes merged 1 commit intophpstan:masterfrom
morozov:mysqli-stub

Conversation

@morozov
Copy link
Copy Markdown
Contributor

@morozov morozov commented Oct 6, 2021

See #692.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this should be smth like

@var array<int, array{errno: int, sqlstate: string, error: string}>

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't this be 0|positive-int as well as is $param_count?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess this one should also never be negative?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If I interpret the docs right, I think this will never be empty, as 00000 means no error

Additionally, update the corresponding procedural style aliases.
@morozov
Copy link
Copy Markdown
Contributor Author

morozov commented Oct 6, 2021

@herndlm thanks for the recommendations. I initially intended to keep the changes scoped to the original issue and keep the signatures consistent with their existing procedural style aliases.

@herndlm
Copy link
Copy Markdown
Contributor

herndlm commented Oct 6, 2021

@herndlm thanks for the recommendations. I initially intended to keep the changes scoped to the original issue and keep the signatures consistent with their existing procedural style aliases.

Yeah I just wanted to suggest things, but I'm still too new here, so do take my comments with a grain of salt please!

@ondrejmirtes ondrejmirtes merged commit d5c2a07 into phpstan:master Oct 6, 2021
@ondrejmirtes
Copy link
Copy Markdown
Member

Thank you both! :)

@morozov morozov deleted the mysqli-stub branch October 6, 2021 15:36
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.

3 participants