Merge "Fix all the Doxygen for the RCFilters backend"
authorjenkins-bot <jenkins-bot@gerrit.wikimedia.org>
Thu, 4 May 2017 08:46:35 +0000 (08:46 +0000)
committerGerrit Code Review <gerrit@wikimedia.org>
Thu, 4 May 2017 08:46:35 +0000 (08:46 +0000)
includes/changes/ChangesListBooleanFilter.php
includes/changes/ChangesListBooleanFilterGroup.php
includes/changes/ChangesListFilter.php
includes/changes/ChangesListFilterGroup.php
includes/changes/ChangesListStringOptionsFilterGroup.php
includes/specialpage/ChangesListSpecialPage.php

index 1c116ab..73c0fb0 100644 (file)
@@ -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;
index 1f4b211..951c407 100644 (file)
@@ -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;
index 9af9adc..bd895bb 100644 (file)
@@ -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 ) {
index 71c474a..3555158 100644 (file)
@@ -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;
index 1abf637..86b4a8b 100644 (file)
@@ -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'] ) ) {
index 3f6d865..97a0f50 100644 (file)
@@ -730,10 +730,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',
@@ -1251,6 +1251,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 ) {