Skip to content

Commit

Permalink
[CS] fix some doc comment types (round 2) (#20647)
Browse files Browse the repository at this point in the history
* PHPCS2 manual changes

- Doc comment for parameter does not match actual variable name
- Comment closer must be on a new line (just convert to single line comment)
- be more specific with the rules we want to exclude

* fix spaces

Expected only 2 spaces after the longest variable name

* one more fix for doc comment

- Doc comment for parameter does not match actual variable name
  • Loading branch information
photodude authored and zero-24 committed Jun 8, 2018
1 parent 74e4327 commit 0c737b5
Show file tree
Hide file tree
Showing 17 changed files with 28 additions and 22 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -125,8 +125,8 @@ abstract class FinderIndexerAdapter extends JPlugin
/**
* Method to instantiate the indexer adapter.
*
* @param object &$subject The object to observe.
* @param array $config An array that holds the plugin configuration.
* @param object $subject The object to observe.
* @param array $config An array that holds the plugin configuration.
*
* @since 2.5
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -443,7 +443,7 @@ public static function getContentPath($url)
* Method to get extra data for a content before being indexed. This is how
* we add Comments, Tags, Labels, etc. that should be available to Finder.
*
* @param FinderIndexerResult &$item The item to index as a FinderIndexerResult object.
* @param FinderIndexerResult $item The item to index as a FinderIndexerResult object.
*
* @return boolean True on success, false on failure.
*
Expand Down
5 changes: 2 additions & 3 deletions administrator/components/com_finder/helpers/indexer/query.php
Original file line number Diff line number Diff line change
Expand Up @@ -244,9 +244,8 @@ public function __construct($options)
// Remove the temporary date storage.
unset($this->dates);

/*
* Lastly, determine whether this query can return a result set.
*/
// Lastly, determine whether this query can return a result set.

// Check if we have a query string.
if (!empty($this->input))
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -350,7 +350,7 @@ private static function step5($word)
* Replaces the first string with the second, at the end of the string. If third
* arg is given, then the preceding string must match that m count at least.
*
* @param string &$str String to check
* @param string $str String to check
* @param string $check Ending to check for
* @param string $repl Replacement string
* @param integer $m Optional minimum number of m() to meet
Expand Down
4 changes: 2 additions & 2 deletions administrator/components/com_finder/models/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ protected function canEditState($record)
/**
* Method to delete one or more records.
*
* @param array &$pks An array of record primary keys.
* @param array $pks An array of record primary keys.
*
* @return boolean True if successful, false if an error occurs.
*
Expand Down Expand Up @@ -395,7 +395,7 @@ protected function populateState($ordering = 'l.title', $direction = 'asc')
/**
* Method to change the published state of one or more records.
*
* @param array &$pks A list of the primary keys to change.
* @param array $pks A list of the primary keys to change.
* @param integer $value The value of the published state. [optional]
*
* @return boolean True on success.
Expand Down
4 changes: 2 additions & 2 deletions administrator/components/com_finder/models/maps.php
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ protected function canEditState($record)
/**
* Method to delete one or more records.
*
* @param array &$pks An array of record primary keys.
* @param array $pks An array of record primary keys.
*
* @return boolean True if successful, false if an error occurs.
*
Expand Down Expand Up @@ -323,7 +323,7 @@ protected function populateState($ordering = 'd.branch_title', $direction = 'ASC
/**
* Method to change the published state of one or more records.
*
* @param array &$pks A list of the primary keys to change.
* @param array $pks A list of the primary keys to change.
* @param integer $value The value of the published state. [optional]
*
* @return boolean True on success.
Expand Down
2 changes: 1 addition & 1 deletion administrator/components/com_finder/tables/filter.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ class FinderTableFilter extends JTable
/**
* Constructor
*
* @param JDatabaseDriver &$db JDatabaseDriver connector object.
* @param JDatabaseDriver $db JDatabaseDriver connector object.
*
* @since 2.5
*/
Expand Down
2 changes: 1 addition & 1 deletion administrator/components/com_finder/tables/link.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ class FinderTableLink extends JTable
/**
* Constructor
*
* @param JDatabaseDriver &$db JDatabaseDriver connector object.
* @param JDatabaseDriver $db JDatabaseDriver connector object.
*
* @since 2.5
*/
Expand Down
2 changes: 1 addition & 1 deletion administrator/components/com_finder/tables/map.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ class FinderTableMap extends JTable
/**
* Constructor
*
* @param JDatabaseDriver &$db JDatabaseDriver connector object.
* @param JDatabaseDriver $db JDatabaseDriver connector object.
*
* @since 2.5
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ protected function _getList($query, $limitstart = 0, $limit = 0)
/**
* Translate a list of objects
*
* @param array &$items The array of objects
* @param array $items The array of objects
*
* @return array The array of translated objects
*/
Expand Down
2 changes: 1 addition & 1 deletion administrator/components/com_installer/models/manage.php
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ protected function populateState($ordering = 'name', $direction = 'asc')
/**
* Enable/Disable an extension.
*
* @param array &$eid Extension ids to un/publish
* @param array $eid Extension ids to un/publish
* @param int $value Publish value
*
* @return boolean True on success
Expand Down
2 changes: 1 addition & 1 deletion administrator/components/com_installer/models/update.php
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ protected function getListQuery()
/**
* Translate a list of objects
*
* @param array &$items The array of objects
* @param array $items The array of objects
*
* @return array The array of translated objects
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ protected function populateState($ordering = 'name', $direction = 'asc')
/**
* Enable/Disable an extension.
*
* @param array &$eid Extension ids to un/publish
* @param array $eid Extension ids to un/publish
* @param int $value Publish value
*
* @return boolean True on success
Expand Down
2 changes: 1 addition & 1 deletion administrator/components/com_menus/helpers/menus.php
Original file line number Diff line number Diff line change
Expand Up @@ -430,7 +430,7 @@ public static function installPreset($preset, $menutype)
/**
* Method to install a preset menu item into database and link it to the given menutype
*
* @param stdClass[] &$items The single menuitem instance with a list of its descendants
* @param stdClass[] $items The single menuitem instance with a list of its descendants
* @param string $menutype The target menutype
* @param int $parent The parent id or object
*
Expand Down
4 changes: 2 additions & 2 deletions administrator/components/com_menus/models/item.php
Original file line number Diff line number Diff line change
Expand Up @@ -1596,7 +1596,7 @@ public function saveorder($idArray = null, $lft_array = null)
/**
* Method to change the home state of one or more items.
*
* @param array &$pks A list of the primary keys to change.
* @param array $pks A list of the primary keys to change.
* @param integer $value The value of the home state.
*
* @return boolean True on success.
Expand Down Expand Up @@ -1683,7 +1683,7 @@ public function setHome(&$pks, $value = 1)
/**
* Method to change the published state of one or more records.
*
* @param array &$pks A list of the primary keys to change.
* @param array $pks A list of the primary keys to change.
* @param integer $value The value of the published state.
*
* @return boolean True on success.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ protected function addToolbar()
/**
* Method to add system link types to the link types array
*
* @param array &$types The list of link types
* @param array $types The list of link types
*
* @return void
*
Expand Down
7 changes: 7 additions & 0 deletions build/phpcs/Joomla/ruleset.xml
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,13 @@
<exclude-pattern type="relative">templates/*</exclude-pattern>
<exclude-pattern type="relative">layouts/*</exclude-pattern>
<exclude-pattern type="relative">tests/*</exclude-pattern>
</rule>

<rule ref="Joomla.Commenting.FunctionComment.MissingParamTag">
<exclude-pattern type="relative">administrator/components/*</exclude-pattern>
</rule>

<rule ref="Joomla.Commenting.FunctionComment.ParamNameNoMatch">
<exclude-pattern type="relative">administrator/components/*</exclude-pattern>
</rule>

Expand Down

0 comments on commit 0c737b5

Please sign in to comment.