-
Notifications
You must be signed in to change notification settings - Fork 22
Adding more comments and naming functions in the debug strings #27
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
Conversation
|
Also I am trying to incorporate this into http://drupal.org/project/microformats as an external library with composer. It is working pretty well so far, but I would like a little more detailed debug messages. |
aaronpk
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.
Thanks for the contribution! I've made a couple comments inline and would appreciate the few minor changes before I merge this.
src/IndieWeb/MentionClient.php
Outdated
| /** | ||
| * finds webmention endpoints in the body. protected function | ||
| * @param $body | ||
| * @param bool $targetURL |
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.
This is actually a string value, which defaults to false.
src/IndieWeb/MentionClient.php
Outdated
| protected function _findWebmentionEndpointInHeader($link_header, $targetURL=false) { | ||
| /** | ||
| * @param $link_header | ||
| * @param bool $targetURL |
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.
Same as above, this is actually a string.
| * @param $sourceURL string URL to examine to send mentions to | ||
| * @param bool $sourceBody if true will search for outgoing links with this (string). | ||
| * @return int | ||
| * @see \Mf2\parse |
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.
What is this for?
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.
sorry which line? This was a little while ago, I can't recall, i can take it out. I put @see because it made more sense to me after checking mf2 parse.
src/IndieWeb/MentionClient.php
Outdated
| /** | ||
| * @codeCoverageIgnore | ||
| * Enables debug messages to appear during activity. Not recommended for production use. | ||
| * @codeCoverageIgnore |
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.
kinda silly but there's an extra space here
src/IndieWeb/MentionClient.php
Outdated
| public static function findOutgoingLinks($input) { | ||
| // Find all outgoing links in the source | ||
| if(is_string($input)) { | ||
| if (is_string($input)) { |
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.
Please don't add whitespace like this.
src/IndieWeb/MentionClient.php
Outdated
| /** | ||
| * Static function for XML-RPC encoding request. | ||
| * @param $method string goes into MethodName XML tag | ||
| * @param $params array set of strings that go into param/valye XML tags. |
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.
typo: "value"
src/IndieWeb/MentionClient.php
Outdated
| } | ||
|
|
||
| /** | ||
| * Configuration key/value system for MentionClient |
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.
Better would be "Caching key/value system..."
src/IndieWeb/MentionClient.php
Outdated
| * Configuration key/value system for MentionClient | ||
| * @param $type | ||
| * @param $url | ||
| * @param null $val |
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.
Should be "mixed". If this is not null, this value is set as the cached value.
|
Alright I put those in, I wasn't sure what you meant on the 366 one. Thanks for clarifying how it works! |
|
Awesome, thanks! And sorry for the delay on this! |
Easier to read. Adds PHPDoc to most of the MentionClient functions. Also makes the debug messages prefixed with what function you are in right now. Added spaces around some IF statements.