Skip to content

Conversation

@HongPong
Copy link
Contributor

@HongPong HongPong commented May 8, 2016

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.

@HongPong
Copy link
Contributor Author

HongPong commented May 8, 2016

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.

Copy link
Member

@aaronpk aaronpk left a 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.

/**
* finds webmention endpoints in the body. protected function
* @param $body
* @param bool $targetURL
Copy link
Member

@aaronpk aaronpk Sep 30, 2016

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.

protected function _findWebmentionEndpointInHeader($link_header, $targetURL=false) {
/**
* @param $link_header
* @param bool $targetURL
Copy link
Member

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
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is this for?

Copy link
Contributor Author

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.

/**
* @codeCoverageIgnore
* Enables debug messages to appear during activity. Not recommended for production use.
* @codeCoverageIgnore
Copy link
Member

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

public static function findOutgoingLinks($input) {
// Find all outgoing links in the source
if(is_string($input)) {
if (is_string($input)) {
Copy link
Member

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.

/**
* 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.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

typo: "value"

}

/**
* Configuration key/value system for MentionClient
Copy link
Member

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..."

* Configuration key/value system for MentionClient
* @param $type
* @param $url
* @param null $val
Copy link
Member

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.

@HongPong
Copy link
Contributor Author

Alright I put those in, I wasn't sure what you meant on the 366 one. Thanks for clarifying how it works!

@aaronpk
Copy link
Member

aaronpk commented Oct 12, 2016

Awesome, thanks! And sorry for the delay on this!

@aaronpk aaronpk merged commit cbaa705 into indieweb:master Oct 12, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants