Improvements of phpdocs and fix phpstan reported errors#134
Improvements of phpdocs and fix phpstan reported errors#134williamdes wants to merge 11 commits intodompdf:masterfrom
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.
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.
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.
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: