-
Notifications
You must be signed in to change notification settings - Fork 8
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
Documentation: various fixes #65
Conversation
* Add short descriptions to various functions, properties and function parameters. * Add missing function docblocks. * Move some `@throws` tags which were placed with the wrong function. * Add short descriptions to all `@throws` tags. * Fix incorrect documentation - `Whip_InvalidVersionRequirementMessage::__construct()` `$detected` description: `if found` versus `if not found`
src/Whip_VersionRequirement.php
Outdated
@@ -41,7 +47,7 @@ public function __construct( $component, $version, $operator = '=' ) { | |||
} | |||
|
|||
/** | |||
* Gets the component name defined for the requirement. | |||
* Get the component name defined for the requirement. |
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.
We always write the method descriptions in the third person singular form.
If the term gets
is not clear, Retrieves
is another option, but otherwise the current form is fine.
src/messages/Whip_BasicMessage.php
Outdated
@@ -30,12 +29,22 @@ public function __construct( $body ) { | |||
} | |||
|
|||
/** | |||
* @return string | |||
* Retrieve the message body. |
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.
We always write the method descriptions in the third person singular form.
Retrieves
would be the expected word.
src/messages/Whip_BasicMessage.php
Outdated
*/ | ||
public function body() { | ||
return $this->body; | ||
} | ||
|
||
/** | ||
* Validate the parameters passed to the constructor of this class. |
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.
We always write the method descriptions in the third person singular form.
Expected validates
*/ | ||
public function __construct( Whip_VersionRequirement $requirement, $detected ) { | ||
$this->requirement = $requirement; | ||
$this->detected = $detected; | ||
} | ||
|
||
/** | ||
* @return string | ||
* Retrieve the message body. |
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.
We always write the method descriptions in the third person singular form.
Expected Retrieves
src/messages/Whip_NullMessage.php
Outdated
@@ -11,7 +11,9 @@ | |||
class Whip_NullMessage implements Whip_Message { | |||
|
|||
/** | |||
* @return string | |||
* Retrieve the message body. |
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.
We always write the method descriptions in the third person singular form.
Expected Retrieves
src/Whip_VersionRequirement.php
Outdated
@@ -50,7 +56,7 @@ public function component() { | |||
} | |||
|
|||
/** | |||
* Gets the components version defined for the requirement. | |||
* Get the components version defined for the requirement. |
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.
We always write the method descriptions in the third person singular form.
If the term gets
is not clear, Retrieves
is another option, but otherwise the current form is fine.
src/Whip_VersionRequirement.php
Outdated
@@ -59,7 +65,7 @@ public function version() { | |||
} | |||
|
|||
/** | |||
* Returns the operator to use when comparing version numbers. | |||
* Get the operator to use when comparing version numbers. |
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.
We always write the method descriptions in the third person singular form.
If the term gets
is not clear, Retrieves
is another option, but otherwise the current form is fine.
src/Whip_VersionRequirement.php
Outdated
@@ -68,7 +74,7 @@ public function operator() { | |||
} | |||
|
|||
/** | |||
* Creates a new version requirement from a comparison string. | |||
* Create a new version requirement from a comparison string. |
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.
We always write the method descriptions in the third person singular form.
src/Whip_VersionRequirement.php
Outdated
@@ -99,15 +105,15 @@ public static function fromCompareString( $component, $comparisonString ) { | |||
} | |||
|
|||
/** | |||
* Validates the parameters passed to the requirement. | |||
* Validate the parameters passed to the requirement. |
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.
We always write the method descriptions in the third person singular form.
* Use third person singular form * Synchronize the short descriptions used in interface implementations with the function short description used in the interface.
Updated documentation based on feedback
@moorscode Once verified, I suggest these two commits should be squashed or I could fix up the original commit if you prefer. |
@throws
tags which were placed with the wrong function.@throws
tags.Whip_InvalidVersionRequirementMessage::__construct()
$detected
description:if found
versusif not found