Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

Tofandel
Copy link

@Tofandel Tofandel commented Feb 4, 2025

The score of a category is a double between 0 and 1. Not an array

The score of a category is a double between 0 and 1. Not an array
@Tofandel Tofandel requested review from yoshi-approver and a team as code owners February 4, 2025 18:17
Copy link

google-cla bot commented Feb 4, 2025

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

@Tofandel Tofandel changed the title Fix annotation type of score LighthouseCategoryV5 fix(phpdoc): annotation type of score LighthouseCategoryV5 Feb 7, 2025
@razvanphp
Copy link
Contributor

This PR cannot be accepted, those files are automatically generated and cannot be changed manually.

See here the source where this comes from: discoveries/pagespeedonline.v5.json#L492

@Tofandel
Copy link
Author

Tofandel commented Mar 12, 2025

I'd be interested to know how they are generated, as the phpdoc for setters is not a valid phpdoc syntax and thus the params are not properly inferred in ide or phpstan

@razvanphp
Copy link
Contributor

razvanphp commented Mar 12, 2025

I’ve fixed that in #6295

@bshaffer
Copy link
Contributor

Closing in favor of #6295

@bshaffer bshaffer closed this Sep 11, 2025
@Tofandel
Copy link
Author

@bshaffer You misunderstood as that PR does not fix the issue this PR was trying to solve, the comment was a reference to this

the phpdoc for setters is not a valid phpdoc syntax

I’ve fixed that in #6295

So apparently the type comes from https://github.com/googleapis/discovery-artifact-manager/blob/755317aaaa2f967c057b621a4ec59bb6599730ca/discoveries/pagespeedonline.v5.json#L450 but if it is any there, why does it become array here? Ideally it should be a double

@bshaffer
Copy link
Contributor

An any type would be mixed, not a double

@Tofandel
Copy link
Author

Which is why I don't understand why it's array in this repo, it's always been any in the other one

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