-
Notifications
You must be signed in to change notification settings - Fork 83
Improvements of phpdocs and fix phpstan reported errors #134
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
base: master
Are you sure you want to change the base?
Conversation
``` ------ ----------------------------------------------------------------------------------- Line Svg/Document.php ------ ----------------------------------------------------------------------------------- 407 PHPDoc tag @var with type Svg\Tag\AbstractTag is not subtype of native type null. 🪪 varTag.nativeType ------ ----------------------------------------------------------------------------------- ```
For `$o` they always exist but phpstan can not detect it
bsweeney
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Realized the change needs a bit of work before I can merge it.
| * @param $id | ||
| * @param $action | ||
| * @param string $options | ||
| * @param string $id |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Documenting $id as a string (here and in every other method) is incorrect. $id should be an integer representing the object number. That's why you're getting "X does not accept a string" warnings from phpstan.
| * @param array $object_info | ||
| * @return array|false | ||
| * @throws FontNotFoundException | ||
| * @throws \FontLib\Exception\FontNotFoundException |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In your comment about remaining issues phpstan is reporting this is not a subtype of Throwable, except it's a subtype of Exception so should be OK. Thoughts?
|
I'll make a few minor changes once you have a chance to review my comments and make any necessary changes. I noted a few issues I'd like to address separately from this PR since most of these changes are documentary in nature. Namely:
|
Ref: #133
Left over: