Skip to content
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

Merged
merged 2 commits into from
May 9, 2018
Merged

Conversation

jrfnl
Copy link
Contributor

@jrfnl jrfnl commented Mar 26, 2018

  • 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

* 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`
@@ -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.
Copy link
Contributor

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.

@@ -30,12 +29,22 @@ public function __construct( $body ) {
}

/**
* @return string
* Retrieve the message body.
Copy link
Contributor

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.

*/
public function body() {
return $this->body;
}

/**
* Validate the parameters passed to the constructor of this class.
Copy link
Contributor

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.
Copy link
Contributor

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

@@ -11,7 +11,9 @@
class Whip_NullMessage implements Whip_Message {

/**
* @return string
* Retrieve the message body.
Copy link
Contributor

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

@@ -50,7 +56,7 @@ public function component() {
}

/**
* Gets the components version defined for the requirement.
* Get the components version defined for the requirement.
Copy link
Contributor

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.

@@ -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.
Copy link
Contributor

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.

@@ -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.
Copy link
Contributor

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.

@@ -99,15 +105,15 @@ public static function fromCompareString( $component, $comparisonString ) {
}

/**
* Validates the parameters passed to the requirement.
* Validate the parameters passed to the requirement.
Copy link
Contributor

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.
@jrfnl
Copy link
Contributor Author

jrfnl commented May 9, 2018

Updated documentation based on feedback

  • Use third person singular form
  • Synchronize the short descriptions used in interface implementations with the function short description used in the interface. (extra check done)

@moorscode Once verified, I suggest these two commits should be squashed or I could fix up the original commit if you prefer.

@jrfnl jrfnl assigned moorscode and unassigned jrfnl May 9, 2018
@jrfnl jrfnl dismissed moorscode’s stale review May 9, 2018 09:21

Feedback has been processed.

@moorscode moorscode merged commit 76faa73 into master May 9, 2018
@moorscode moorscode deleted the JRF/various-documentation-fixes branch May 9, 2018 12:52
@jrfnl jrfnl added this to the Next release milestone May 9, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants