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

Small error with PHPDoc: long[] should be int[]? #261

Closed
jclee100 opened this issue Mar 27, 2017 · 5 comments
Closed

Small error with PHPDoc: long[] should be int[]? #261

jclee100 opened this issue Mar 27, 2017 · 5 comments
Assignees

Comments

@jclee100
Copy link
Contributor

In FeedItemAttributeValue, some values are defined as long[] when they should be int[]. For example, line 179.

It probably doesn't affect functionality but my IDE is displaying a warning.

@fiboknacky fiboknacky self-assigned this Mar 27, 2017
@fiboknacky
Copy link
Member

Hi JC,

Thanks for reporting.
It's generated from the WSDL file as described here.

As it's a INT64 value, which is equivalent to long, this works as intended from this library aspect.
I'll talk with my colleagues to see why this is named integerValue, not longValue.

Cheers,
Knack

@fiboknacky
Copy link
Member

To clarify, from the library aspect, it works as intended.
So, I'll close this issue soon.

@jclee100
Copy link
Contributor Author

Just being curious. Can you clarify the purpose of the PHPDoc for the library? I see that on AdWordsNormalizer, it uses the doc block for instantiating objects, is this related?

As far as I understand PHPDoc is mainly used to aid IDEs in interpreting code. And in this case long[] is not a valid PHP variable type or a class in the library, I would think int[] should be used.

@fiboknacky
Copy link
Member

fiboknacky commented Mar 29, 2017

Hi @komirad

AdWordsNormalizer is not related to how the classes under src/AdsApi/AdWords/vXXXXXX are generated at all.
Classes in those directories were generated by our modified wsdl2phpgenerator.

And in this case long[] is not a valid PHP variable type or a class in the library, I would think int[] should be used.

Ah, I missed this point. Then your argument is valid that we should change the PHPDoc to generate int for INT64 type of WSDL.
Let's keep this open until I fix this.

Thanks again.

Best,
Knack

@fiboknacky
Copy link
Member

This is fixed in v28.0.0.

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

No branches or pull requests

2 participants