From: Matthew Flaschen Date: Wed, 3 May 2017 02:47:41 +0000 (-0400) Subject: Fix all the Doxygen for the RCFilters backend X-Git-Tag: 1.31.0-rc.0~3344^2 X-Git-Url: http://git.cyclocoop.org/%24self?a=commitdiff_plain;h=d2c91eb0af7127ad3bf559c9eaca5045fae9de80;p=lhc%2Fweb%2Fwiklou.git Fix all the Doxygen for the RCFilters backend All the lists and sub-lists now render correctly, and missing parameters have been added. Bug: T163069 Change-Id: I7a8c95efaff7c844e32e4375dfe6af8c2e91923f --- diff --git a/includes/changes/ChangesListBooleanFilter.php b/includes/changes/ChangesListBooleanFilter.php index 1c116ab50a..73c0fb01ef 100644 --- a/includes/changes/ChangesListBooleanFilter.php +++ b/includes/changes/ChangesListBooleanFilter.php @@ -30,12 +30,6 @@ use Wikimedia\Rdbms\IDatabase; * @since 1.29 */ class ChangesListBooleanFilter extends ChangesListFilter { - /** - * Name. Used as URL parameter - * - * @var string $name - */ - // This can sometimes be different on Special:RecentChanges // and Special:Watchlist, due to the double-legacy hooks // (SpecialRecentChangesFilters and SpecialWatchlistFilters) @@ -84,32 +78,31 @@ class ChangesListBooleanFilter extends ChangesListFilter { * it's for. * * @param array $filterDefinition ChangesListFilter definition - * - * $filterDefinition['name'] string Name. Used as URL parameter. - * $filterDefinition['group'] ChangesListFilterGroup Group. Filter group this - * belongs to. - * $filterDefinition['label'] string i18n key of label for structured UI. - * $filterDefinition['description'] string i18n key of description for structured - * UI. - * $filterDefinition['showHide'] string Main i18n key used for unstructured UI. - * $filterDefinition['isReplacedInStructuredUi'] bool Whether there is an - * equivalent feature available in the structured UI; this is optional, defaulting - * to true. It does not need to be set if the exact same filter is simply visible - * on both. - * $filterDefinition['default'] bool Default - * $filterDefinition['priority'] int Priority integer. Higher value means higher - * up in the group's filter list. - * $filterDefinition['queryCallable'] callable Callable accepting parameters, used - * to implement filter's DB query modification. Callback parameters: - * string $specialPageClassName Class name of current special page - * IContextSource $context Context, for e.g. user - * IDatabase $dbr Database, for addQuotes, makeList, and similar - * array &$tables Array of tables; see IDatabase::select $table - * array &$fields Array of fields; see IDatabase::select $vars - * array &$conds Array of conditions; see IDatabase::select $conds - * array &$query_options Array of query options; see IDatabase::select $options - * array &$join_conds Array of join conditions; see IDatabase::select $join_conds - * Optional only for legacy filters that still use the query hooks directly + * * $filterDefinition['name'] string Name. Used as URL parameter. + * * $filterDefinition['group'] ChangesListFilterGroup Group. Filter group this + * belongs to. + * * $filterDefinition['label'] string i18n key of label for structured UI. + * * $filterDefinition['description'] string i18n key of description for structured + * UI. + * * $filterDefinition['showHide'] string Main i18n key used for unstructured UI. + * * $filterDefinition['isReplacedInStructuredUi'] bool Whether there is an + * equivalent feature available in the structured UI; this is optional, defaulting + * to true. It does not need to be set if the exact same filter is simply visible + * on both. + * * $filterDefinition['default'] bool Default + * * $filterDefinition['priority'] int Priority integer. Higher value means higher + * up in the group's filter list. + * * $filterDefinition['queryCallable'] callable Callable accepting parameters, used + * to implement filter's DB query modification. Required, except for legacy + * filters that still use the query hooks directly. Callback parameters: + * * string $specialPageClassName Class name of current special page + * * IContextSource $context Context, for e.g. user + * * IDatabase $dbr Database, for addQuotes, makeList, and similar + * * array &$tables Array of tables; see IDatabase::select $table + * * array &$fields Array of fields; see IDatabase::select $vars + * * array &$conds Array of conditions; see IDatabase::select $conds + * * array &$query_options Array of query options; see IDatabase::select $options + * * array &$join_conds Array of join conditions; see IDatabase::select $join_conds */ public function __construct( $filterDefinition ) { parent::__construct( $filterDefinition ); @@ -150,7 +143,7 @@ class ChangesListBooleanFilter extends ChangesListFilter { /** * Sets default * - * @param bool Default value + * @param bool $defaultValue */ public function setDefault( $defaultValue ) { $this->defaultValue = $defaultValue; diff --git a/includes/changes/ChangesListBooleanFilterGroup.php b/includes/changes/ChangesListBooleanFilterGroup.php index 1f4b211f0c..951c4077c2 100644 --- a/includes/changes/ChangesListBooleanFilterGroup.php +++ b/includes/changes/ChangesListBooleanFilterGroup.php @@ -19,21 +19,21 @@ class ChangesListBooleanFilterGroup extends ChangesListFilterGroup { * @param array $groupDefinition Configuration of group * * $groupDefinition['name'] string Group name * * $groupDefinition['title'] string i18n key for title (optional, can be omitted - * * only if none of the filters in the group display in the structured UI) + * only if none of the filters in the group display in the structured UI) * * $groupDefinition['priority'] int Priority integer. Higher means higher in the - * * group list. + * group list. * * $groupDefinition['filters'] array Numeric array of filter definitions, each of which - * * is an associative array to be passed to the filter constructor. However, - * * 'priority' is optional for the filters. Any filter that has priority unset - * * will be put to the bottom, in the order given. + * is an associative array to be passed to the filter constructor. However, + * 'priority' is optional for the filters. Any filter that has priority unset + * will be put to the bottom, in the order given. * * $groupDefinition['whatsThisHeader'] string i18n key for header of "What's - * * This" popup (optional). + * This" popup (optional). * * $groupDefinition['whatsThisBody'] string i18n key for body of "What's This" - * * popup (optional). + * popup (optional). * * $groupDefinition['whatsThisUrl'] string URL for main link of "What's This" - * * popup (optional). + * popup (optional). * * $groupDefinition['whatsThisLinkText'] string i18n key of text for main link of - * * "What's This" popup (optional). + * "What's This" popup (optional). */ public function __construct( array $groupDefinition ) { $groupDefinition['isFullCoverage'] = true; diff --git a/includes/changes/ChangesListFilter.php b/includes/changes/ChangesListFilter.php index 9af9adc010..bd895bb075 100644 --- a/includes/changes/ChangesListFilter.php +++ b/includes/changes/ChangesListFilter.php @@ -74,25 +74,25 @@ abstract class ChangesListFilter { protected $description; /** - * List of conflicting groups + * Array of associative arrays with conflict information. See + * setUnidirectionalConflict * - * @var array $conflictingGroups Array of associative arrays with conflict - * information. See setUnidirectionalConflict + * @var array $conflictingGroups */ protected $conflictingGroups = []; /** - * List of conflicting filters + * Array of associative arrays with conflict information. See + * setUnidirectionalConflict * - * @var array $conflictingFilters Array of associative arrays with conflict - * information. See setUnidirectionalConflict + * @var array $conflictingFilters */ protected $conflictingFilters = []; /** - * List of filters that are a subset of the current filter + * Array of associative arrays with subset information * - * @var array $subsetFilters Array of associative arrays with subset information + * @var array $subsetFilters */ protected $subsetFilters = []; @@ -117,23 +117,22 @@ abstract class ChangesListFilter { * UI it's for. * * @param array $filterDefinition ChangesListFilter definition - * - * $filterDefinition['name'] string Name of filter; use lowercase with no - * punctuation - * $filterDefinition['cssClassSuffix'] string CSS class suffix, used to mark - * that a particular row belongs to this filter (when a row is included by the - * filter) (optional) - * $filterDefinition['isRowApplicableCallable'] Callable taking two parameters, the - * IContextSource, and the RecentChange object for the row, and returning true if - * the row is attributed to this filter. The above CSS class will then be - * automatically added (optional, required if cssClassSuffix is used). - * $filterDefinition['group'] ChangesListFilterGroup Group. Filter group this - * belongs to. - * $filterDefinition['label'] string i18n key of label for structured UI. - * $filterDefinition['description'] string i18n key of description for structured - * UI. - * $filterDefinition['priority'] int Priority integer. Higher value means higher - * up in the group's filter list. + * * $filterDefinition['name'] string Name of filter; use lowercase with no + * punctuation + * * $filterDefinition['cssClassSuffix'] string CSS class suffix, used to mark + * that a particular row belongs to this filter (when a row is included by the + * filter) (optional) + * * $filterDefinition['isRowApplicableCallable'] Callable taking two parameters, the + * IContextSource, and the RecentChange object for the row, and returning true if + * the row is attributed to this filter. The above CSS class will then be + * automatically added (optional, required if cssClassSuffix is used). + * * $filterDefinition['group'] ChangesListFilterGroup Group. Filter group this + * belongs to. + * * $filterDefinition['label'] string i18n key of label for structured UI. + * * $filterDefinition['description'] string i18n key of description for structured + * UI. + * * $filterDefinition['priority'] int Priority integer. Higher value means higher + * up in the group's filter list. */ public function __construct( array $filterDefinition ) { if ( isset( $filterDefinition['group'] ) ) { @@ -251,7 +250,7 @@ abstract class ChangesListFilter { * This means that anything in the results for the other filter is also in the * results for this one. * - * @param ChangesListFilter The filter the current instance is a superset of + * @param ChangesListFilter $other The filter the current instance is a superset of */ public function setAsSupersetOf( ChangesListFilter $other ) { if ( $other->getGroup() !== $this->getGroup() ) { @@ -346,7 +345,7 @@ abstract class ChangesListFilter { * * @param IContextSource $ctx Context source * @param RecentChange $rc Recent changes object - * @param Non-associative array of CSS class names; appended to if needed + * @param array &$classes Non-associative array of CSS class names; appended to if needed */ public function applyCssClassIfNeeded( IContextSource $ctx, RecentChange $rc, array &$classes ) { if ( $this->isRowApplicableCallable === null ) { diff --git a/includes/changes/ChangesListFilterGroup.php b/includes/changes/ChangesListFilterGroup.php index 71c474ac0f..3555158ed4 100644 --- a/includes/changes/ChangesListFilterGroup.php +++ b/includes/changes/ChangesListFilterGroup.php @@ -106,18 +106,18 @@ abstract class ChangesListFilterGroup { protected $isFullCoverage; /** - * List of conflicting groups + * Array of associative arrays with conflict information. See + * setUnidirectionalConflict * - * @var array $conflictingGroups Array of associative arrays with conflict - * information. See setUnidirectionalConflict + * @var array $conflictingGroups */ protected $conflictingGroups = []; /** - * List of conflicting filters + * Array of associative arrays with conflict information. See + * setUnidirectionalConflict * - * @var array $conflictingFilters Array of associative arrays with conflict - * information. See setUnidirectionalConflict + * @var array $conflictingFilters */ protected $conflictingFilters = []; @@ -131,25 +131,25 @@ abstract class ChangesListFilterGroup { * @param array $groupDefinition Configuration of group * * $groupDefinition['name'] string Group name; use camelCase with no punctuation * * $groupDefinition['title'] string i18n key for title (optional, can be omitted - * * only if none of the filters in the group display in the structured UI) + * only if none of the filters in the group display in the structured UI) * * $groupDefinition['type'] string A type constant from a subclass of this one * * $groupDefinition['priority'] int Priority integer. Higher value means higher - * * up in the group list (optional, defaults to -100). + * up in the group list (optional, defaults to -100). * * $groupDefinition['filters'] array Numeric array of filter definitions, each of which - * * is an associative array to be passed to the filter constructor. However, - * * 'priority' is optional for the filters. Any filter that has priority unset - * * will be put to the bottom, in the order given. + * is an associative array to be passed to the filter constructor. However, + * 'priority' is optional for the filters. Any filter that has priority unset + * will be put to the bottom, in the order given. * * $groupDefinition['isFullCoverage'] bool Whether the group is full coverage; - * * if true, this means that checking every item in the group means no - * * changes list entries are filtered out. + * if true, this means that checking every item in the group means no + * changes list entries are filtered out. * * $groupDefinition['whatsThisHeader'] string i18n key for header of "What's - * * This" popup (optional). + * This" popup (optional). * * $groupDefinition['whatsThisBody'] string i18n key for body of "What's This" - * * popup (optional). + * popup (optional). * * $groupDefinition['whatsThisUrl'] string URL for main link of "What's This" - * * popup (optional). + * popup (optional). * * $groupDefinition['whatsThisLinkText'] string i18n key of text for main link of - * * "What's This" popup (optional). + * "What's This" popup (optional). */ public function __construct( array $groupDefinition ) { if ( strpos( $groupDefinition['name'], self::RESERVED_NAME_CHAR ) !== false ) { @@ -315,7 +315,8 @@ abstract class ChangesListFilterGroup { } /** - * @return array Associative array of ChangesListFilter objects, with filter name as key + * @return ChangesListFilter[] Associative array of ChangesListFilter objects, with + * filter name as key */ public function getFilters() { return $this->filters; diff --git a/includes/changes/ChangesListStringOptionsFilterGroup.php b/includes/changes/ChangesListStringOptionsFilterGroup.php index 1abf637804..86b4a8bc74 100644 --- a/includes/changes/ChangesListStringOptionsFilterGroup.php +++ b/includes/changes/ChangesListStringOptionsFilterGroup.php @@ -60,12 +60,6 @@ class ChangesListStringOptionsFilterGroup extends ChangesListFilterGroup { */ const NONE = ''; - /** - * Group name; used as form parameter. - * - * @var string $name - */ - /** * Defaul parameter value * @@ -86,35 +80,35 @@ class ChangesListStringOptionsFilterGroup extends ChangesListFilterGroup { * @param array $groupDefinition Configuration of group * * $groupDefinition['name'] string Group name * * $groupDefinition['title'] string i18n key for title (optional, can be omitted - * * only if none of the filters in the group display in the structured UI) + * only if none of the filters in the group display in the structured UI) * * $groupDefinition['priority'] int Priority integer. Higher means higher in the - * * group list. + * group list. * * $groupDefinition['filters'] array Numeric array of filter definitions, each of which - * * is an associative array to be passed to the filter constructor. However, - * * 'priority' is optional for the filters. Any filter that has priority unset - * * will be put to the bottom, in the order given. + * is an associative array to be passed to the filter constructor. However, + * 'priority' is optional for the filters. Any filter that has priority unset + * will be put to the bottom, in the order given. * * $groupDefinition['default'] string Default for group. * * $groupDefinition['isFullCoverage'] bool Whether the group is full coverage; - * * if true, this means that checking every item in the group means no - * * changes list entries are filtered out. + * if true, this means that checking every item in the group means no + * changes list entries are filtered out. * * $groupDefinition['queryCallable'] callable Callable accepting parameters: - * * string $specialPageClassName Class name of current special page - * * IContextSource $context Context, for e.g. user - * * IDatabase $dbr Database, for addQuotes, makeList, and similar - * * array &$tables Array of tables; see IDatabase::select $table - * * array &$fields Array of fields; see IDatabase::select $vars - * * array &$conds Array of conditions; see IDatabase::select $conds - * * array &$query_options Array of query options; see IDatabase::select $options - * * array &$join_conds Array of join conditions; see IDatabase::select $join_conds - * * array $selectedValues The allowed and requested values, lower-cased and sorted + * * string $specialPageClassName Class name of current special page + * * IContextSource $context Context, for e.g. user + * * IDatabase $dbr Database, for addQuotes, makeList, and similar + * * array &$tables Array of tables; see IDatabase::select $table + * * array &$fields Array of fields; see IDatabase::select $vars + * * array &$conds Array of conditions; see IDatabase::select $conds + * * array &$query_options Array of query options; see IDatabase::select $options + * * array &$join_conds Array of join conditions; see IDatabase::select $join_conds + * * array $selectedValues The allowed and requested values, lower-cased and sorted * * $groupDefinition['whatsThisHeader'] string i18n key for header of "What's - * * This" popup (optional). + * This" popup (optional). * * $groupDefinition['whatsThisBody'] string i18n key for body of "What's This" - * * popup (optional). + * popup (optional). * * $groupDefinition['whatsThisUrl'] string URL for main link of "What's This" - * * popup (optional). + * popup (optional). * * $groupDefinition['whatsThisLinkText'] string i18n key of text for main link of - * * "What's This" popup (optional). + * "What's This" popup (optional). */ public function __construct( array $groupDefinition ) { if ( !isset( $groupDefinition['isFullCoverage'] ) ) { diff --git a/includes/specialpage/ChangesListSpecialPage.php b/includes/specialpage/ChangesListSpecialPage.php index 93cc18fa42..87d73fc20d 100644 --- a/includes/specialpage/ChangesListSpecialPage.php +++ b/includes/specialpage/ChangesListSpecialPage.php @@ -824,10 +824,10 @@ abstract class ChangesListSpecialPage extends SpecialPage { /** * Get filter group definition from legacy custom filters * - * @param array Custom filters from legacy hooks + * @param array $customFilters Custom filters from legacy hooks * @return array Group definition */ - protected function getFilterGroupDefinitionFromLegacyCustomFilters( $customFilters ) { + protected function getFilterGroupDefinitionFromLegacyCustomFilters( array $customFilters ) { // Special internal unstructured group $unstructuredGroupDefinition = [ 'name' => 'unstructured', @@ -1345,6 +1345,8 @@ abstract class ChangesListSpecialPage extends SpecialPage { * @param array &$query_options Array of query options; see IDatabase::select $options * @param array &$join_conds Array of join conditions; see IDatabase::select $join_conds * @param array $selectedExpLevels The allowed active values, sorted + * @param int $now Number of seconds since the UNIX epoch, or 0 if not given + * (optional) */ public function filterOnUserExperienceLevel( $specialPageClassName, $context, $dbr, &$tables, &$fields, &$conds, &$query_options, &$join_conds, $selectedExpLevels, $now = 0 ) {