-
Notifications
You must be signed in to change notification settings - Fork 50
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
Add links to type tags #94
Conversation
Add proper support for void element and add a test case to the approriate files.
Note: there are no tests for intersection types (neither on their own nor combined with union types) as I don't know how to write the appropriate xml and couldn't find any examples of it in the English docs. |
This reverts commit 5041918.
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.
Looks good just some questions/remarks
case "boolean": | ||
case "integer": |
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.
Those, plus the "double"
case should warn IMHO, as those are an alternative spelling for the proper built-in types that should not exist in the documentation any more. But can be a follow-up PR.
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.
I was thinking about this and other warnings. There's a whole range of formatting and logic errors we could catch in Phd from whitespace in all sorts of tags, incompatible type combinations, etc.
If this was implemented as some sort of option that Phd could be called from the command line with, this whole doc checker could be added as an additional step to the documentations' pull request workflow. Maybe?
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.
I think this makes sense, but I was certain we already had support for warnings in PhD as I had seen them 🤔
Maybe if it's a new render that runs fast and doesn't need indexing, having it run on CI would make sense. Last time it came up there were concerns about the CI taking too long, or running too frequently as a PR might be update often in quick successions
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.
Oh, yeah. The error handler is right there in functions.php
, a file included in everything Phd which I also never looked inside. :-)
So this format would be called with the --noindex
option, it would have to override the createLink()
, update()
and appendData()
methods at a minimum, and it's validation method(s) could return null
and would raise warnings on validation errors. Sounds fairly simple, so it's probably far from it. :-)
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.
As everything with PhD :D it looks simple and it isn't :D
Replace type separator conditional with match. Undo trimming type text. Update tests. Add methodparam to default chunk property and use it to initialize empty current chunk.
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.
Final late remark :)
tests/php/data/type_rendering_constructorsynopsis_parameters-and-return-type.xml
Show resolved
Hide resolved
I changed all |
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.
Looks good to me :)
Sorry for the delay was at PHP UK
I appreciate you taking the time to review these PR at all. :-) Especially that you made it very clear that Phd is not too close to your heart, to put it mildly. :-) |
Add links to all
<type>
s in<methodsynopsis>
and<constructorsynopsis>
tags. Based on #33.Includes the following>
<span>
tags into its own method and used it for parameters toovoid
rendering method<methodsynopsis>
and<constructorsynopsis>
parameters, and<methodsynopsis>
return types