Skip to content

Documented all $id parameters in API classes as int #640

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

Merged
merged 1 commit into from
Oct 25, 2017
Merged

Documented all $id parameters in API classes as int #640

merged 1 commit into from
Oct 25, 2017

Conversation

morozov
Copy link
Contributor

@morozov morozov commented Oct 25, 2017

When analyzing code which uses GitHub API, static analyzers like PHPStan may produce false positives like:

↪ phpstan analyse -l 7 src tests
 3/3 [▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓] 100%

 ------ -------------------------------------------------------------------------------------- 
  Line   src/Changeset.php                                                                     
 ------ -------------------------------------------------------------------------------------- 
  120    Parameter #3 $id of method Github\Api\PullRequest::show() expects string, int given.  
 ------ -------------------------------------------------------------------------------------- 

According to the documentation, all changed $ids are integers.

@acrobat
Copy link
Collaborator

acrobat commented Oct 25, 2017

Thanks @morozov!

@acrobat acrobat merged commit b36d661 into KnpLabs:master Oct 25, 2017
@morozov morozov deleted the int-id branch July 1, 2020 15:06
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