Skip to content

Commit

Permalink
Standardize Doxygen @param tags
Browse files Browse the repository at this point in the history
Use "@param datatype $paramname description" format.

Change-Id: If52c7f971575584028f5192a1fa87b0fda434ff0
  • Loading branch information
ricordisamoa committed Apr 30, 2016
1 parent e375e9e commit 1f64f4d
Show file tree
Hide file tree
Showing 14 changed files with 30 additions and 30 deletions.
2 changes: 1 addition & 1 deletion client/WikibaseClient.hooks.php
Original file line number Diff line number Diff line change
Expand Up @@ -347,7 +347,7 @@ public static function onGetPreferences( User $user, array &$prefs ) {
/**
* Register the parser functions.
*
* @param $parser Parser
* @param Parser $parser
*
* @return bool
*/
Expand Down
2 changes: 1 addition & 1 deletion lib/includes/LanguageWithConversion.php
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,7 @@ public function translate( $text ) {
*
* Does nothing if this is not a converted language.
*
* @param $text String
* @param string $text
*/
private function prepareForTranslate( $text ) {
if ( $this->parentLanguage ) {
Expand Down
2 changes: 1 addition & 1 deletion repo/Wikibase.hooks.php
Original file line number Diff line number Diff line change
Expand Up @@ -303,7 +303,7 @@ public static function onArticleUndelete( Title $title, $created, $comment ) {
*
* @todo: find a better way to do this!
*
* @param $recentChange RecentChange
* @param RecentChange $recentChange
* @return bool
*/
public static function onRecentChangeSave( RecentChange $recentChange ) {
Expand Down
4 changes: 2 additions & 2 deletions repo/includes/Actions/EditEntityAction.php
Original file line number Diff line number Diff line change
Expand Up @@ -434,8 +434,8 @@ private function showDiffStyle() {
/**
* Generate standard summary input and label (wgSummary), compatible to EditPage.
*
* @param $summary string The value of the summary input
* @param $labelText string The html to place inside the label
* @param string $summary The value of the summary input
* @param string $labelText The html to place inside the label
*
* @return array An array in the format array( $label, $input )
*/
Expand Down
4 changes: 2 additions & 2 deletions repo/includes/Api/ApiErrorReporter.php
Original file line number Diff line number Diff line change
Expand Up @@ -340,7 +340,7 @@ public function addStatusToResult( Status $status, &$data ) {
* This provides support for message lists coming from Status::getErrorsByType() as well as
* Title::getUserPermissionsErrors() etc.
*
* @param $messageSpecs array a list of errors, as returned by Status::getErrorsByType()
* @param array $messageSpecs a list of errors, as returned by Status::getErrorsByType()
* or Title::getUserPermissionsErrors()
*
* @return array a result structure containing the messages from $errors as well as what
Expand Down Expand Up @@ -383,7 +383,7 @@ private function convertMessagesToResult( array $messageSpecs ) {
*
* @see convertToMessage()
*
* @param $messageSpecs array a list of errors, as returned by Status::getErrorsByType()
* @param array $messageSpecs a list of errors, as returned by Status::getErrorsByType()
* or Title::getUserPermissionsErrors().
*
* @return array a result structure containing the messages from $errors as well as what
Expand Down
4 changes: 2 additions & 2 deletions repo/includes/Api/ModifyEntity.php
Original file line number Diff line number Diff line change
Expand Up @@ -464,8 +464,8 @@ public function execute() {
/**
* Check the rights for the user accessing the module.
*
* @param $entity EntityDocument the entity to check
* @param $user User doing the action
* @param EntityDocument $entity the entity to check
* @param User $user User doing the action
*
* @return Status the check's result
*/
Expand Down
22 changes: 11 additions & 11 deletions repo/includes/Api/ResultBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ public function __construct(
/**
* @since 0.5
*
* @param $success bool|int|null
* @param bool|int|null $success
*/
public function markSuccess( $success = true ) {
$value = (int)$success;
Expand All @@ -145,9 +145,9 @@ public function markSuccess( $success = true ) {
*
* @since 0.5
*
* @param $path array|string|null
* @param $name string
* @param $values array
* @param array|string|null $path
* @param string $name
* @param array $values
* @param string $tag tag name to use for elements of $values if not already present
*/
public function setList( $path, $name, array $values, $tag ) {
Expand Down Expand Up @@ -178,9 +178,9 @@ public function setList( $path, $name, array $values, $tag ) {
*
* @since 0.5
*
* @param $path array|string|null
* @param $name string
* @param $value mixed
* @param array|string|null $path
* @param string $name
* @param mixed $value
*/
public function setValue( $path, $name, $value ) {
$this->checkPathType( $path );
Expand All @@ -204,10 +204,10 @@ public function setValue( $path, $name, $value ) {
*
* @since 0.5
*
* @param $path array|string|null
* @param $key int|string|null the key to use when appending, or null for automatic.
* @param array|string|null $path
* @param int|string|null $key the key to use when appending, or null for automatic.
* May be ignored even if given, based on $this->addMetaData.
* @param $value mixed
* @param mixed $value
* @param string $tag tag name to use for $value in indexed mode
*/
public function appendValue( $path, $key, $value, $tag ) {
Expand All @@ -234,7 +234,7 @@ private function checkPathType( $path ) {
}

/**
* @param $key int|string|null the key to use when appending, or null for automatic.
* @param int|string|null $key the key to use when appending, or null for automatic.
*/
private function checkKeyType( $key ) {
Assert::parameter(
Expand Down
6 changes: 3 additions & 3 deletions repo/includes/Content/EntityHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -556,9 +556,9 @@ public function getSpecialPageForCreation() {
*
* @since 0.4
*
* @param $latestRevision Revision The current text
* @param $newerRevision Revision The revision to undo
* @param $olderRevision Revision Must be an earlier revision than $undo
* @param Revision $latestRevision The current text
* @param Revision $newerRevision The revision to undo
* @param Revision $olderRevision Must be an earlier revision than $undo
*
* @return Content|bool Content on success, false on failure
*/
Expand Down
2 changes: 1 addition & 1 deletion repo/includes/Diff/EntityContentDiffView.php
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ public function getDiffLang() {
/**
* Get a header for a specified revision.
*
* @param $rev Revision
* @param Revision $rev
* @param string $complete 'complete' to get the header wrapped depending
* the visibility of the revision and a link to edit the page.
*
Expand Down
2 changes: 1 addition & 1 deletion repo/includes/Specials/SpecialSetSiteLink.php
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ protected function modifyEntity( EntityDocument $entity ) {
/**
* Checks if the site id is valid.
*
* @param $siteId string the site id
* @param string $siteId the site id
*
* @return bool
*/
Expand Down
2 changes: 1 addition & 1 deletion repo/tests/phpunit/includes/Api/EntityTestHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -392,7 +392,7 @@ public static function getId( $handle ) {
}

/**
* @param $id string of entityid
* @param string $id string of entityid
* @return null|string id of current handle (if active)
*/
public static function getHandle( $id ) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,8 @@ public function doApiRequest( array $params ) {
* @since 0.5
*
* Do the test for exceptions from Api queries.
* @param $params array of params for the api query
* @param $exception array details of the exception to expect (type,code,message)
* @param array $params array of params for the api query
* @param array $exception details of the exception to expect (type,code,message)
*/
public function doTestQueryExceptions( $params, $exception ) {
try {
Expand Down
2 changes: 1 addition & 1 deletion view/src/EntityTermsView.php
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ private function getHtmlForAliases( $languageCode, AliasGroupList $aliasGroups )
}

/**
* @param $languageCode The language for which terms should be edited
* @param string $languageCode The language for which terms should be edited
* @param EntityId|null $entityId
*
* @return string HTML
Expand Down
2 changes: 1 addition & 1 deletion view/src/Template/TemplateFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ public function get( $key, array $params ) {
*
* @since 0.2
*
* @param $key string template key
* @param string $key template key
* Varargs: normal template parameters
*
* @return string
Expand Down

0 comments on commit 1f64f4d

Please sign in to comment.