Fixed some @params documentation (includes/*)
authorumherirrender <umherirrender_de.wp@web.de>
Sun, 20 Apr 2014 21:33:05 +0000 (23:33 +0200)
committerumherirrender <umherirrender_de.wp@web.de>
Sun, 20 Apr 2014 21:33:05 +0000 (23:33 +0200)
Swapped some "$var type" to "type $var" or added missing types
before the $var. Changed some other types to match the more common
spelling. Makes beginning of some text in captial.

Change-Id: Ifbb1da2a6278b0bde2a6f6ce2e7bd383ee3fb28a

43 files changed:
includes/htmlform/HTMLButtonField.php
includes/htmlform/HTMLCheckField.php
includes/htmlform/HTMLCheckMatrix.php
includes/htmlform/HTMLForm.php
includes/htmlform/HTMLFormField.php
includes/htmlform/HTMLMultiSelectField.php
includes/htmlform/HTMLNestedFilterable.php
includes/htmlform/HTMLRadioField.php
includes/htmlform/HTMLSelectAndOtherField.php
includes/htmlform/HTMLSelectOrOtherField.php
includes/jobqueue/Job.php
includes/jobqueue/JobQueue.php
includes/jobqueue/JobQueueDB.php
includes/jobqueue/JobQueueFederated.php
includes/jobqueue/JobQueueGroup.php
includes/jobqueue/JobQueueRedis.php
includes/jobqueue/jobs/DoubleRedirectJob.php
includes/jobqueue/jobs/RefreshLinksJob2.php
includes/jobqueue/jobs/UploadFromUrlJob.php
includes/resourceloader/ResourceLoader.php
includes/resourceloader/ResourceLoaderContext.php
includes/resourceloader/ResourceLoaderFileModule.php
includes/resourceloader/ResourceLoaderFilePageModule.php
includes/resourceloader/ResourceLoaderLanguageDataModule.php
includes/resourceloader/ResourceLoaderModule.php
includes/resourceloader/ResourceLoaderNoscriptModule.php
includes/resourceloader/ResourceLoaderSiteModule.php
includes/resourceloader/ResourceLoaderStartUpModule.php
includes/resourceloader/ResourceLoaderUserCSSPrefsModule.php
includes/resourceloader/ResourceLoaderUserGroupsModule.php
includes/resourceloader/ResourceLoaderUserModule.php
includes/resourceloader/ResourceLoaderUserOptionsModule.php
includes/resourceloader/ResourceLoaderUserTokensModule.php
includes/resourceloader/ResourceLoaderWikiModule.php
includes/search/SearchEngine.php
includes/search/SearchHighlighter.php
includes/search/SearchMssql.php
includes/search/SearchMySQL.php
includes/search/SearchOracle.php
includes/search/SearchPostgres.php
includes/search/SearchResult.php
includes/search/SearchResultSet.php
includes/search/SearchSqlite.php

index f8d017c..09c0ad9 100644 (file)
@@ -31,10 +31,10 @@ class HTMLButtonField extends HTMLFormField {
        /**
         * Button cannot be invalid
         *
-        * @param $value String
-        * @param $alldata Array
+        * @param string $value
+        * @param array $alldata
         *
-        * @return Bool
+        * @return bool
         */
        public function validate( $value, $alldata ) {
                return true;
index 7baab66..c7ec014 100644 (file)
@@ -36,7 +36,7 @@ class HTMLCheckField extends HTMLFormField {
        /**
         * For a checkbox, the label goes on the right hand side, and is
         * added in getInputHTML(), rather than HTMLFormField::getRow()
-        * @return String
+        * @return string
         */
        function getLabel() {
                return '&#160;';
@@ -44,15 +44,16 @@ class HTMLCheckField extends HTMLFormField {
 
        /**
         * checkboxes don't need a label.
+        * @return bool
         */
        protected function needsLabel() {
                return false;
        }
 
        /**
-        * @param $request WebRequest
+        * @param WebRequest $request
         *
-        * @return String
+        * @return string
         */
        function loadDataFromRequest( $request ) {
                $invert = false;
index 2fc170c..606523b 100644 (file)
@@ -75,9 +75,9 @@ class HTMLCheckMatrix extends HTMLFormField implements HTMLNestedFilterable {
         * mParams['rows'] is an array with row labels as keys and row tags as values.
         * mParams['columns'] is an array with column labels as keys and column tags as values.
         *
-        * @param array $value of the options that should be checked
+        * @param array $value Array of the options that should be checked
         *
-        * @return String
+        * @return string
         */
        function getInputHTML( $value ) {
                $html = '';
@@ -159,9 +159,9 @@ class HTMLCheckMatrix extends HTMLFormField implements HTMLNestedFilterable {
         * line above the options in the case of a checkbox matrix, i.e. it's always
         * a "vertical-label".
         *
-        * @param string $value the value to set the input to
+        * @param string $value The value to set the input to
         *
-        * @return String complete HTML table row
+        * @return string Complete HTML table row
         */
        function getTableRow( $value ) {
                list( $errors, $errorClass ) = $this->getErrorsAndErrorClass( $value );
@@ -187,9 +187,9 @@ class HTMLCheckMatrix extends HTMLFormField implements HTMLNestedFilterable {
        }
 
        /**
-        * @param $request WebRequest
+        * @param WebRequest $request
         *
-        * @return Array
+        * @return array
         */
        function loadDataFromRequest( $request ) {
                if ( $this->mParent->getMethod() == 'post' ) {
index 21505a8..c7bac0d 100644 (file)
@@ -181,13 +181,13 @@ class HTMLForm extends ContextSource {
        /**
         * Format in which to display form. For viable options,
         * @see $availableDisplayFormats
-        * @var String
+        * @var string
         */
        protected $displayFormat = 'table';
 
        /**
         * Available formats in which to display the form
-        * @var Array
+        * @var array
         */
        protected $availableDisplayFormats = array(
                'table',
@@ -199,10 +199,10 @@ class HTMLForm extends ContextSource {
        /**
         * Build a new HTMLForm from an array of field attributes
         *
-        * @param array $descriptor of Field constructs, as described above
-        * @param $context IContextSource available since 1.18, will become compulsory in 1.18.
+        * @param array $descriptor Array of Field constructs, as described above
+        * @param IContextSource $context Available since 1.18, will become compulsory in 1.18.
         *     Obviates the need to call $form->setTitle()
-        * @param string $messagePrefix a prefix to go in front of default messages
+        * @param string $messagePrefix A prefix to go in front of default messages
         */
        public function __construct( $descriptor, /*IContextSource*/ $context = null,
                $messagePrefix = ''
@@ -267,8 +267,8 @@ class HTMLForm extends ContextSource {
        /**
         * Set format in which to display the form
         *
-        * @param string $format the name of the format to use, must be one of
-        *        $this->availableDisplayFormats
+        * @param string $format The name of the format to use, must be one of
+        *   $this->availableDisplayFormats
         *
         * @throws MWException
         * @since 1.20
@@ -287,7 +287,7 @@ class HTMLForm extends ContextSource {
        /**
         * Getter for displayFormat
         * @since 1.20
-        * @return String
+        * @return string
         */
        public function getDisplayFormat() {
                return $this->displayFormat;
@@ -296,7 +296,7 @@ class HTMLForm extends ContextSource {
        /**
         * Test if displayFormat is 'vform'
         * @since 1.22
-        * @return Bool
+        * @return bool
         */
        public function isVForm() {
                return $this->displayFormat === 'vform';
@@ -388,7 +388,7 @@ class HTMLForm extends ContextSource {
 
        /**
         * Try submitting, with edit token check first
-        * @return Status|boolean
+        * @return Status|bool
         */
        function tryAuthorizedSubmit() {
                $result = false;
@@ -419,7 +419,7 @@ class HTMLForm extends ContextSource {
         * The here's-one-I-made-earlier option: do the submission if
         * posted, or display the form with or without funky validation
         * errors
-        * @return Bool or Status whether submission was successful.
+        * @return bool|Status Whether submission was successful.
         */
        function show() {
                $this->prepareForm();
@@ -438,7 +438,7 @@ class HTMLForm extends ContextSource {
         * Validate all the fields, and call the submission callback
         * function if everything is kosher.
         * @throws MWException
-        * @return Mixed Bool true == Successful submission, Bool false
+        * @return mixed Bool true == Successful submission, Bool false
         *     == No submission attempted, anything else == Error to
         *     display.
         */
@@ -476,7 +476,7 @@ class HTMLForm extends ContextSource {
         * Set a callback to a function to do something with the form
         * once it's been successfully validated.
         *
-        * @param string $cb function name.  The function will be passed
+        * @param string $cb Function name.  The function will be passed
         *     the output from HTMLForm::filterDataForSubmit, and must
         *     return Bool true on success, Bool false if no submission
         *     was attempted, or String HTML output to display on error.
@@ -492,7 +492,7 @@ class HTMLForm extends ContextSource {
        /**
         * Set a message to display on a validation error.
         *
-        * @param $msg Mixed String or Array of valid inputs to wfMessage()
+        * @param string|array $msg String or Array of valid inputs to wfMessage()
         *     (so each entry can be either a String or Array)
         *
         * @return HTMLForm $this for chaining calls (since 1.20)
@@ -506,7 +506,7 @@ class HTMLForm extends ContextSource {
        /**
         * Set the introductory message, overwriting any existing message.
         *
-        * @param string $msg complete text of message to display
+        * @param string $msg Complete text of message to display
         *
         * @return HTMLForm $this for chaining calls (since 1.20)
         */
@@ -520,7 +520,7 @@ class HTMLForm extends ContextSource {
         * Set the introductory message, overwriting any existing message.
         * @since 1.19
         *
-        * @param string $msg complete text of message to display
+        * @param string $msg Complete text of message to display
         *
         * @return HTMLForm $this for chaining calls (since 1.20)
         */
@@ -533,7 +533,7 @@ class HTMLForm extends ContextSource {
        /**
         * Add introductory text.
         *
-        * @param string $msg complete text of message to display
+        * @param string $msg Complete text of message to display
         *
         * @return HTMLForm $this for chaining calls (since 1.20)
         */
@@ -546,7 +546,7 @@ class HTMLForm extends ContextSource {
        /**
         * Add header text, inside the form.
         *
-        * @param string $msg complete text of message to display
+        * @param string $msg Complete text of message to display
         * @param string $section The section to add the header to
         *
         * @return HTMLForm $this for chaining calls (since 1.20)
@@ -568,8 +568,8 @@ class HTMLForm extends ContextSource {
         * Set header text, inside the form.
         * @since 1.19
         *
-        * @param string $msg complete text of message to display
-        * @param $section The section to add the header to
+        * @param string $msg Complete text of message to display
+        * @param string $section The section to add the header to
         *
         * @return HTMLForm $this for chaining calls (since 1.20)
         */
@@ -608,7 +608,7 @@ class HTMLForm extends ContextSource {
         * Set footer text, inside the form.
         * @since 1.19
         *
-        * @param string $msg complete text of message to display
+        * @param string $msg Complete text of message to display
         * @param string $section The section to add the footer text to
         *
         * @return HTMLForm $this for chaining calls (since 1.20)
@@ -626,7 +626,7 @@ class HTMLForm extends ContextSource {
        /**
         * Add text to the end of the display.
         *
-        * @param string $msg complete text of message to display
+        * @param string $msg Complete text of message to display
         *
         * @return HTMLForm $this for chaining calls (since 1.20)
         */
@@ -639,7 +639,7 @@ class HTMLForm extends ContextSource {
        /**
         * Set text at the end of the display.
         *
-        * @param string $msg complete text of message to display
+        * @param string $msg Complete text of message to display
         *
         * @return HTMLForm $this for chaining calls (since 1.20)
         */
@@ -652,9 +652,9 @@ class HTMLForm extends ContextSource {
        /**
         * Add a hidden field to the output
         *
-        * @param string $name field name.  This will be used exactly as entered
-        * @param string $value field value
-        * @param $attribs Array
+        * @param string $name Field name.  This will be used exactly as entered
+        * @param string $value Field value
+        * @param array $attribs
         *
         * @return HTMLForm $this for chaining calls (since 1.20)
         */
@@ -686,10 +686,10 @@ class HTMLForm extends ContextSource {
        /**
         * Add a button to the form
         *
-        * @param string $name field name.
-        * @param string $value field value
+        * @param string $name Field name.
+        * @param string $value Field value
         * @param string $id DOM id for the button (default: null)
-        * @param $attribs Array
+        * @param array $attribs
         *
         * @return HTMLForm $this for chaining calls (since 1.20)
         */
@@ -707,7 +707,7 @@ class HTMLForm extends ContextSource {
         * Moreover, when doing method chaining this should be the very last method
         * call just after prepareForm().
         *
-        * @param $submitResult Mixed output from HTMLForm::trySubmit()
+        * @param mixed $submitResult Mixed output from HTMLForm::trySubmit()
         *
         * @return Nothing, should be last call
         */
@@ -718,7 +718,7 @@ class HTMLForm extends ContextSource {
        /**
         * Returns the raw HTML generated by the form
         *
-        * @param $submitResult Mixed output from HTMLForm::trySubmit()
+        * @param mixed $submitResult Mixed output from HTMLForm::trySubmit()
         *
         * @return string
         */
@@ -753,7 +753,7 @@ class HTMLForm extends ContextSource {
         *
         * @param string $html HTML contents to wrap.
         *
-        * @return String wrapped HTML.
+        * @return string Wrapped HTML.
         */
        function wrapForm( $html ) {
 
@@ -785,7 +785,7 @@ class HTMLForm extends ContextSource {
 
        /**
         * Get the hidden fields that should go inside the form.
-        * @return String HTML.
+        * @return string HTML.
         */
        function getHiddenFields() {
                global $wgArticlePath;
@@ -814,7 +814,7 @@ class HTMLForm extends ContextSource {
 
        /**
         * Get the submit and (potentially) reset buttons.
-        * @return String HTML.
+        * @return string HTML.
         */
        function getButtons() {
                $buttons = '';
@@ -895,7 +895,7 @@ class HTMLForm extends ContextSource {
 
        /**
         * Get the whole body of the form.
-        * @return String
+        * @return string
         */
        function getBody() {
                return $this->displaySection( $this->mFieldTree, $this->mTableId );
@@ -904,9 +904,9 @@ class HTMLForm extends ContextSource {
        /**
         * Format and display an error message stack.
         *
-        * @param $errors String|Array|Status
+        * @param string|array|Status $errors
         *
-        * @return String
+        * @return string
         */
        function getErrors( $errors ) {
                if ( $errors instanceof Status ) {
@@ -931,7 +931,7 @@ class HTMLForm extends ContextSource {
         *
         * @param array $errors of message keys/values
         *
-        * @return String HTML, a "<ul>" list of errors
+        * @return string HTML, a "<ul>" list of errors
         */
        public static function formatErrors( $errors ) {
                $errorstr = '';
@@ -973,7 +973,7 @@ class HTMLForm extends ContextSource {
         * Set the text for the submit button to a message
         * @since 1.19
         *
-        * @param string $msg message key
+        * @param string $msg Message key
         *
         * @return HTMLForm $this for chaining calls (since 1.20)
         */
@@ -1018,7 +1018,7 @@ class HTMLForm extends ContextSource {
        /**
         * Set the id for the submit button.
         *
-        * @param $t String.
+        * @param string $t
         *
         * @todo FIXME: Integrity of $t is *not* validated
         * @return HTMLForm $this for chaining calls (since 1.20)
@@ -1050,7 +1050,7 @@ class HTMLForm extends ContextSource {
         *
         * @since 1.22
         *
-        * @param string $id new value of the id attribute, or "" to remove
+        * @param string $id New value of the id attribute, or "" to remove
         *
         * @return HTMLForm $this for chaining calls
         */
@@ -1092,7 +1092,7 @@ class HTMLForm extends ContextSource {
         * this message as its "<legend>" element.
         * @since 1.19
         *
-        * @param string $msg message key
+        * @param string $msg Message key
         *
         * @return HTMLForm $this for chaining calls (since 1.20)
         */
@@ -1107,7 +1107,7 @@ class HTMLForm extends ContextSource {
         * @todo Currently only used for the "<fieldset>" legend on forms
         * with multiple sections; should be used elsewhere?
         *
-        * @param $p String
+        * @param string $p
         *
         * @return HTMLForm $this for chaining calls (since 1.20)
         */
@@ -1120,7 +1120,7 @@ class HTMLForm extends ContextSource {
        /**
         * Set the title for form submission
         *
-        * @param $t Title of page the form is on/should be posted to
+        * @param Title $t Title of page the form is on/should be posted to
         *
         * @return HTMLForm $this for chaining calls (since 1.20)
         */
@@ -1143,7 +1143,7 @@ class HTMLForm extends ContextSource {
        /**
         * Set the method used to submit the form
         *
-        * @param $method String
+        * @param string $method
         *
         * @return HTMLForm $this for chaining calls (since 1.20)
         */
@@ -1166,9 +1166,9 @@ class HTMLForm extends ContextSource {
         *   section, ignored if empty.
         * @param string $fieldsetIDPrefix ID prefix for the "<fieldset>" tag of
         *   each subsection, ignored if empty.
-        * @param boolean &$hasUserVisibleFields Whether the section had user-visible fields.
+        * @param bool &$hasUserVisibleFields Whether the section had user-visible fields.
         *
-        * @return String
+        * @return string
         */
        public function displaySection( $fields,
                $sectionName = '',
@@ -1302,8 +1302,7 @@ class HTMLForm extends ContextSource {
        /**
         * Stop a reset button being shown for this form
         *
-        * @param bool $suppressReset set to false to re-enable the
-        *     button again
+        * @param bool $suppressReset Set to false to re-enable the button again
         *
         * @return HTMLForm $this for chaining calls (since 1.20)
         */
@@ -1318,7 +1317,7 @@ class HTMLForm extends ContextSource {
         * to the form as a whole, after it's submitted but before it's
         * processed.
         *
-        * @param $data
+        * @param array $data
         *
         * @return
         */
@@ -1330,9 +1329,9 @@ class HTMLForm extends ContextSource {
         * Get a string to go in the "<legend>" of a section fieldset.
         * Override this if you want something more complicated.
         *
-        * @param $key String
+        * @param string $key
         *
-        * @return String
+        * @return string
         */
        public function getLegend( $key ) {
                return $this->msg( "{$this->mMessagePrefix}-$key" )->text();
index e6d316c..fdb3924 100644 (file)
@@ -48,7 +48,7 @@ abstract class HTMLFormField {
         *
         * Parameters are the same as wfMessage().
         *
-        * @return Message object
+        * @return Message
         */
        function msg() {
                $args = func_get_args();
@@ -70,7 +70,7 @@ abstract class HTMLFormField {
         * @param string $value The value the field was submitted with
         * @param array $alldata The data collected from the form
         *
-        * @return Mixed Bool true on success, or String error to display.
+        * @return bool|string true on success, or String error to display.
         */
        function validate( $value, $alldata ) {
                if ( isset( $this->mParams['required'] )
@@ -123,7 +123,7 @@ abstract class HTMLFormField {
         * or the input's default value if it has not been set.
         *
         * @param WebRequest $request
-        * @return String the value
+        * @return string The value
         */
        function loadDataFromRequest( $request ) {
                if ( $request->getCheck( $this->mName ) ) {
@@ -345,7 +345,7 @@ abstract class HTMLFormField {
         *
         * @param string|null $helptext
         *
-        * @return String
+        * @return string
         */
        public function getHelpTextHtmlDiv( $helptext ) {
                if ( is_null( $helptext ) ) {
@@ -362,7 +362,7 @@ abstract class HTMLFormField {
         * @since 1.20
         *
         * @param string|null $helptext
-        * @return String
+        * @return string
         */
        public function getHelpTextHtmlRaw( $helptext ) {
                return $this->getHelpTextHtmlDiv( $helptext );
@@ -596,8 +596,7 @@ abstract class HTMLFormField {
         * flatten an array of options to a single array, for instance,
         * a set of "<options>" inside "<optgroups>".
         *
-        * @param array $options Associative Array with values either Strings
-        *     or Arrays
+        * @param array $options Associative Array with values either Strings or Arrays
         * @return array Flattened input
         */
        public static function flattenOptions( $options ) {
@@ -617,7 +616,7 @@ abstract class HTMLFormField {
        /**
         * Formats one or more errors as accepted by field validation-callback.
         *
-        * @param string|Message|array $errors String|Message|Array of strings or Message instances
+        * @param string|Message|array $errors Array of strings or Message instances
         * @return string HTML
         * @since 1.18
         */
index f802771..576f5cd 100644 (file)
@@ -70,9 +70,9 @@ class HTMLMultiSelectField extends HTMLFormField implements HTMLNestedFilterable
        }
 
        /**
-        * @param $request WebRequest
+        * @param WebRequest $request
         *
-        * @return String
+        * @return string
         */
        function loadDataFromRequest( $request ) {
                if ( $this->mParent->getMethod() == 'post' ) {
index f6f3ad5..2c09ea4 100644 (file)
@@ -5,7 +5,7 @@ interface HTMLNestedFilterable {
         * Support for seperating multi-option preferences into multiple preferences
         * Due to lack of array support.
         *
-        * @param $data array
+        * @param array $data
         */
        function filterDataForSubmit( $data );
 }
index c52f0a8..8765407 100644 (file)
@@ -28,9 +28,9 @@ class HTMLRadioField extends HTMLFormField {
         * This returns a block of all the radio options, in one cell.
         * @see includes/HTMLFormField#getInputHTML()
         *
-        * @param $value String
+        * @param string $value
         *
-        * @return String
+        * @return string
         */
        function getInputHTML( $value ) {
                $html = $this->formatOptions( $this->getOptions(), strval( $value ) );
index bb42d53..19b2f7c 100644 (file)
@@ -60,9 +60,9 @@ class HTMLSelectAndOtherField extends HTMLSelectField {
        }
 
        /**
-        * @param $request WebRequest
+        * @param WebRequest $request
         *
-        * @return Array("<overall message>","<select value>","<text field value>")
+        * @return array("<overall message>","<select value>","<text field value>")
         */
        function loadDataFromRequest( $request ) {
                if ( $request->getCheck( $this->mName ) ) {
index 21f3b77..a001c43 100644 (file)
@@ -62,9 +62,9 @@ class HTMLSelectOrOtherField extends HTMLTextField {
        }
 
        /**
-        * @param $request WebRequest
+        * @param WebRequest $request
         *
-        * @return String
+        * @return string
         */
        function loadDataFromRequest( $request ) {
                if ( $request->getCheck( $this->mName ) ) {
index 5fc1e06..3456373 100644 (file)
@@ -87,7 +87,7 @@ abstract class Job implements IJobSpecification {
         * This may add duplicate at insert time, but they will be
         * removed later on, when the first one is popped.
         *
-        * @param array $jobs of Job objects
+        * @param array $jobs Array of Job objects
         * @return bool
         * @deprecated since 1.21
         */
@@ -102,7 +102,7 @@ abstract class Job implements IJobSpecification {
         * be rolled-back as part of a larger transaction. However,
         * large batches of jobs can cause slave lag.
         *
-        * @param array $jobs of Job objects
+        * @param array $jobs Array of Job objects
         * @return bool
         * @deprecated since 1.21
         */
@@ -115,7 +115,7 @@ abstract class Job implements IJobSpecification {
         * actually find a job; it may be adversely affected by concurrent job
         * runners.
         *
-        * @param $type string
+        * @param string $type
         * @return Job|bool Returns false if there are no jobs
         * @deprecated since 1.21
         */
@@ -139,9 +139,9 @@ abstract class Job implements IJobSpecification {
         *------------------------------------------------------------------------*/
 
        /**
-        * @param $command
-        * @param $title
-        * @param $params array|bool
+        * @param string $command
+        * @param Title $title
+        * @param array|bool $params
         */
        public function __construct( $command, $title, $params = false ) {
                $this->command = $command;
@@ -199,7 +199,7 @@ abstract class Job implements IJobSpecification {
        }
 
        /**
-        * @return integer Number of actually "work items" handled in this job
+        * @return int Number of actually "work items" handled in this job
         * @see $wgJobBackoffThrottling
         * @since 1.23
         */
index 9b13aea..c858e42 100644 (file)
@@ -344,7 +344,7 @@ abstract class JobQueue {
        /**
         * @see JobQueue::batchPush()
         * @param array $jobs
-        * @param $flags
+        * @param array $flags
         */
        abstract protected function doBatchPush( array $jobs, $flags );
 
index 5f1ca14..1991bb4 100644 (file)
@@ -189,7 +189,7 @@ class JobQueueDB extends JobQueue {
        /**
         * @see JobQueue::doBatchPush()
         * @param array $jobs
-        * @param $flags
+        * @param array $flags
         * @throws DBError|Exception
         * @return bool
         */
@@ -338,7 +338,7 @@ class JobQueueDB extends JobQueue {
         * Reserve a row with a single UPDATE without holding row locks over RTTs...
         *
         * @param string $uuid 32 char hex string
-        * @param $rand integer Random unsigned integer (31 bits)
+        * @param int $rand Random unsigned integer (31 bits)
         * @param bool $gte Search for job_random >= $random (otherwise job_random <= $random)
         * @return stdClass|bool Row|false
         */
@@ -774,7 +774,7 @@ class JobQueueDB extends JobQueue {
        }
 
        /**
-        * @param $index integer (DB_SLAVE/DB_MASTER)
+        * @param int $index (DB_SLAVE/DB_MASTER)
         * @return DBConnRef
         */
        protected function getDB( $index ) {
@@ -786,7 +786,7 @@ class JobQueueDB extends JobQueue {
        }
 
        /**
-        * @param $property
+        * @param string $property
         * @return string
         */
        private function getCacheKey( $property ) {
@@ -797,7 +797,7 @@ class JobQueueDB extends JobQueue {
        }
 
        /**
-        * @param $params
+        * @param array|bool $params
         * @return string
         */
        protected static function makeBlob( $params ) {
@@ -809,7 +809,7 @@ class JobQueueDB extends JobQueue {
        }
 
        /**
-        * @param $blob
+        * @param string $blob
         * @return bool|mixed
         */
        protected static function extractBlob( $blob ) {
index 05ded4e..9d46a00 100644 (file)
@@ -555,7 +555,7 @@ class JobQueueFederated extends JobQueue {
        }
 
        /**
-        * @param $property
+        * @param string $property
         * @return string
         */
        private function getCacheKey( $property ) {
index 6591282..948baa0 100644 (file)
@@ -254,7 +254,7 @@ class JobQueueGroup {
        /**
         * Check if there are any queues with jobs (this is cached)
         *
-        * @param integer $type JobQueueGroup::TYPE_* constant
+        * @param int $type JobQueueGroup::TYPE_* constant
         * @return bool
         * @since 1.23
         */
@@ -414,7 +414,7 @@ class JobQueueGroup {
        }
 
        /**
-        * @param $name string
+        * @param string $name
         * @return mixed
         */
        private function getCachedConfigVar( $name ) {
index 135a61d..f5a266e 100644 (file)
@@ -194,7 +194,7 @@ class JobQueueRedis extends JobQueue {
        /**
         * @see JobQueue::doBatchPush()
         * @param array $jobs
-        * @param $flags
+        * @param array $flags
         * @return bool
         * @throws JobQueueError
         */
@@ -350,7 +350,7 @@ LUA;
 
        /**
         * @param RedisConnRef $conn
-        * @return array serialized string or false
+        * @return array Serialized string or false
         * @throws RedisException
         */
        protected function popAndDeleteBlob( RedisConnRef $conn ) {
@@ -383,7 +383,7 @@ LUA;
 
        /**
         * @param RedisConnRef $conn
-        * @return array serialized string or false
+        * @return array Serialized string or false
         * @throws RedisException
         */
        protected function popAndAcquireBlob( RedisConnRef $conn ) {
@@ -614,8 +614,8 @@ LUA;
        /**
         * This function should not be called outside JobQueueRedis
         *
-        * @param $uid string
-        * @param $conn RedisConnRef
+        * @param string $uid
+        * @param RedisConnRef $conn
         * @return Job|bool Returns false if the job does not exist
         * @throws MWException|JobQueueError
         */
@@ -773,7 +773,7 @@ LUA;
        }
 
        /**
-        * @param $fields array
+        * @param array $fields
         * @return Job|bool
         */
        protected function getJobFromFields( array $fields ) {
@@ -840,8 +840,8 @@ LUA;
        }
 
        /**
-        * @param $conn RedisConnRef
-        * @param $e RedisException
+        * @param RedisConnRef $conn
+        * @param RedisException $e
         * @throws JobQueueError
         */
        protected function throwRedisException( RedisConnRef $conn, $e ) {
@@ -850,8 +850,8 @@ LUA;
        }
 
        /**
-        * @param $prop string
-        * @param $type string|null
+        * @param string $prop
+        * @param string|null $type
         * @return string
         */
        private function getQueueKey( $prop, $type = null ) {
@@ -865,7 +865,7 @@ LUA;
        }
 
        /**
-        * @param $key string
+        * @param string $key
         * @return void
         */
        public function setTestingPrefix( $key ) {
index 94b56ef..34c302e 100644 (file)
@@ -42,9 +42,9 @@ class DoubleRedirectJob extends Job {
 
        /**
         * Insert jobs into the job queue to fix redirects to the given title
-        * @param string $reason the reason for the fix, see message
+        * @param string $reason The reason for the fix, see message
         *   "double-redirect-fixed-<reason>"
-        * @param $redirTitle Title: the title which has changed, redirects
+        * @param Title $redirTitle The title which has changed, redirects
         *   pointing to this title are fixed
         * @param bool $destTitle Not used
         */
@@ -177,9 +177,9 @@ class DoubleRedirectJob extends Job {
        /**
         * Get the final destination of a redirect
         *
-        * @param $title Title
+        * @param Title $title
         *
-        * @return bool if the specified title is not a redirect, or if it is a circular redirect
+        * @return bool If the specified title is not a redirect, or if it is a circular redirect
         */
        public static function getFinalDestination( $title ) {
                $dbw = wfGetDB( DB_MASTER );
index 1a27e1f..97405ae 100644 (file)
@@ -37,7 +37,7 @@ class RefreshLinksJob2 extends Job {
 
        /**
         * Run a refreshLinks2 job
-        * @return boolean success
+        * @return bool Success
         */
        function run() {
                global $wgUpdateRowsPerJob;
@@ -101,9 +101,9 @@ class RefreshLinksJob2 extends Job {
        }
 
        /**
-        * @param $table string
-        * @param $masterPos mixed
-        * @return Array
+        * @param string $table
+        * @param mixed $masterPos
+        * @return array
         */
        protected function getSingleTitleJobs( $table, $masterPos ) {
                # The "start"/"end" fields are not set for the base jobs
@@ -128,7 +128,7 @@ class RefreshLinksJob2 extends Job {
        }
 
        /**
-        * @return Array
+        * @return array
         */
        public function getDeduplicationInfo() {
                $info = parent::getDeduplicationInfo();
index 2cdac57..480246b 100644 (file)
@@ -174,7 +174,7 @@ class UploadFromUrlJob extends Job {
        }
 
        /**
-        * @param $key
+        * @param string $key
         * @return mixed
         */
        public static function &getSessionData( $key ) {
index 6b8c7c4..994812b 100644 (file)
@@ -250,10 +250,10 @@ class ResourceLoader {
         * @param array $info Module info array. For backwards compatibility with 1.17alpha,
         *   this may also be a ResourceLoaderModule object. Optional when using
         *   multiple-registration calling style.
-        * @throws MWException: If a duplicate module registration is attempted
-        * @throws MWException: If a module name contains illegal characters (pipes or commas)
-        * @throws MWException: If something other than a ResourceLoaderModule is being registered
-        * @return boolean False if there were any errors, in which case one or more modules were
+        * @throws MWException If a duplicate module registration is attempted
+        * @throws MWException If a module name contains illegal characters (pipes or commas)
+        * @throws MWException If something other than a ResourceLoaderModule is being registered
+        * @return bool False if there were any errors, in which case one or more modules were
         *   not registered
         */
        public function register( $name, $info = null ) {
@@ -392,7 +392,7 @@ class ResourceLoader {
         *
         * @param string $framework Get only the test module names for one
         *   particular framework (optional)
-        * @return Array
+        * @return array
         */
        public function getTestModuleNames( $framework = 'all' ) {
                /// @todo api siteinfo prop testmodulenames modulenames
@@ -622,7 +622,7 @@ class ResourceLoader {
         * If there's an If-Modified-Since header, respond with a 304 appropriately
         * and clear out the output buffer. If the client cache is too old then do nothing.
         *
-        * @param $context ResourceLoaderContext
+        * @param ResourceLoaderContext $context
         * @param string $mtime The TS_MW timestamp to check the header against
         * @return bool True if 304 header sent and output handled
         */
@@ -721,8 +721,8 @@ class ResourceLoader {
        /**
         * Handle exception display.
         *
-        * @param Exception $e to be shown to the user
-        * @return string sanitized text that can be returned to the user
+        * @param Exception $e Exception to be shown to the user
+        * @return string Sanitized text that can be returned to the user
         */
        public static function formatException( $e ) {
                global $wgShowExceptionDetails;
@@ -737,7 +737,7 @@ class ResourceLoader {
        /**
         * Generate code for a response.
         *
-        * @param $context ResourceLoaderContext Context in which to generate a response
+        * @param ResourceLoaderContext $context Context in which to generate a response
         * @param array $modules List of module objects keyed by module name
         * @param array $missing List of requested module names that are unregistered (optional)
         * @return string Response data
@@ -1016,7 +1016,7 @@ class ResourceLoader {
         *         Set the state of modules with the given names to the given states
         *
         * @param string $name
-        * @param $state
+        * @param string $state
         * @return string
         */
        public static function makeLoaderStateScript( $name, $state = null ) {
@@ -1111,8 +1111,8 @@ class ResourceLoader {
         *   - ResourceLoader::makeLoaderSourcesScript( array( $id1 => $props1, $id2 => $props2, ... ) );
         *       Register sources with the given IDs and properties.
         *
-        * @param string $id source ID
-        * @param array $properties source properties (see addSource())
+        * @param string $id Source ID
+        * @param array $properties Source properties (see addSource())
         * @return string
         */
        public static function makeLoaderSourcesScript( $id, $properties = null ) {
@@ -1200,7 +1200,7 @@ class ResourceLoader {
 
        /**
         * Build a load.php URL
-        * @param array $modules of module names (strings)
+        * @param array $modules Array of module names (strings)
         * @param string $lang Language code
         * @param string $skin Skin name
         * @param string|null $user User name. If null, the &user= parameter is omitted
@@ -1314,7 +1314,7 @@ class ResourceLoader {
         * Get global LESS variables.
         *
         * $since 1.22
-        * @return array: Map of variable names to string CSS values.
+        * @return array Map of variable names to string CSS values.
         */
        public static function getLESSVars() {
                global $wgResourceLoaderLESSVars;
index 0d9ef78..63ec5de 100644 (file)
@@ -46,8 +46,8 @@ class ResourceLoaderContext {
        /* Methods */
 
        /**
-        * @param $resourceLoader ResourceLoader
-        * @param $request WebRequest
+        * @param ResourceLoader $resourceLoader
+        * @param WebRequest $request
         */
        public function __construct( $resourceLoader, WebRequest $request ) {
                global $wgDefaultSkin, $wgResourceLoaderDebug;
@@ -79,7 +79,7 @@ class ResourceLoaderContext {
         * an array of module names like array( 'jquery.foo', 'jquery.bar',
         * 'jquery.ui.baz', 'jquery.ui.quux' )
         * @param string $modules Packed module name list
-        * @return array of module names
+        * @return array Array of module names
         */
        public static function expandModuleNames( $modules ) {
                $retval = array();
@@ -184,14 +184,14 @@ class ResourceLoaderContext {
        }
 
        /**
-        * @return String|null
+        * @return string|null
         */
        public function getOnly() {
                return $this->only;
        }
 
        /**
-        * @return String|null
+        * @return string|null
         */
        public function getVersion() {
                return $this->version;
index 68bfe59..61fb111 100644 (file)
@@ -29,12 +29,12 @@ class ResourceLoaderFileModule extends ResourceLoaderModule {
 
        /* Protected Members */
 
-       /** String: Local base path, see __construct() */
+       /** @var string Local base path, see __construct() */
        protected $localBasePath = '';
-       /** String: Remote base path, see __construct() */
+       /** @var string Remote base path, see __construct() */
        protected $remoteBasePath = '';
        /**
-        * Array: List of paths to JavaScript files to always include
+        * @var array List of paths to JavaScript files to always include
         * @par Usage:
         * @code
         * array( [file-path], [file-path], ... )
@@ -42,7 +42,7 @@ class ResourceLoaderFileModule extends ResourceLoaderModule {
         */
        protected $scripts = array();
        /**
-        * Array: List of JavaScript files to include when using a specific language
+        * @var array List of JavaScript files to include when using a specific language
         * @par Usage:
         * @code
         * array( [language-code] => array( [file-path], [file-path], ... ), ... )
@@ -50,7 +50,7 @@ class ResourceLoaderFileModule extends ResourceLoaderModule {
         */
        protected $languageScripts = array();
        /**
-        * Array: List of JavaScript files to include when using a specific skin
+        * @var array List of JavaScript files to include when using a specific skin
         * @par Usage:
         * @code
         * array( [skin-name] => array( [file-path], [file-path], ... ), ... )
@@ -58,7 +58,7 @@ class ResourceLoaderFileModule extends ResourceLoaderModule {
         */
        protected $skinScripts = array();
        /**
-        * Array: List of paths to JavaScript files to include in debug mode
+        * @var array List of paths to JavaScript files to include in debug mode
         * @par Usage:
         * @code
         * array( [skin-name] => array( [file-path], [file-path], ... ), ... )
@@ -66,7 +66,7 @@ class ResourceLoaderFileModule extends ResourceLoaderModule {
         */
        protected $debugScripts = array();
        /**
-        * Array: List of paths to JavaScript files to include in the startup module
+        * @var array List of paths to JavaScript files to include in the startup module
         * @par Usage:
         * @code
         * array( [file-path], [file-path], ... )
@@ -74,7 +74,7 @@ class ResourceLoaderFileModule extends ResourceLoaderModule {
         */
        protected $loaderScripts = array();
        /**
-        * Array: List of paths to CSS files to always include
+        * @var array List of paths to CSS files to always include
         * @par Usage:
         * @code
         * array( [file-path], [file-path], ... )
@@ -82,7 +82,7 @@ class ResourceLoaderFileModule extends ResourceLoaderModule {
         */
        protected $styles = array();
        /**
-        * Array: List of paths to CSS files to include when using specific skins
+        * @var array List of paths to CSS files to include when using specific skins
         * @par Usage:
         * @code
         * array( [file-path], [file-path], ... )
@@ -90,7 +90,7 @@ class ResourceLoaderFileModule extends ResourceLoaderModule {
         */
        protected $skinStyles = array();
        /**
-        * Array: List of modules this module depends on
+        * @var array List of modules this module depends on
         * @par Usage:
         * @code
         * array( [file-path], [file-path], ... )
@@ -98,31 +98,31 @@ class ResourceLoaderFileModule extends ResourceLoaderModule {
         */
        protected $dependencies = array();
        /**
-        * Array: List of message keys used by this module
+        * @var array List of message keys used by this module
         * @par Usage:
         * @code
         * array( [message-key], [message-key], ... )
         * @endcode
         */
        protected $messages = array();
-       /** String: Name of group to load this module in */
+       /** @var string Name of group to load this module in */
        protected $group;
-       /** String: Position on the page to load this module at */
+       /** @var string Position on the page to load this module at */
        protected $position = 'bottom';
-       /** Boolean: Link to raw files in debug mode */
+       /** @var bool Link to raw files in debug mode */
        protected $debugRaw = true;
-       /** Boolean: Whether mw.loader.state() call should be omitted */
+       /** @var bool Whether mw.loader.state() call should be omitted */
        protected $raw = false;
        protected $targets = array( 'desktop' );
 
        /**
-        * Boolean: Whether getStyleURLsForDebug should return raw file paths,
+        * @var bool Whether getStyleURLsForDebug should return raw file paths,
         * or return load.php urls
         */
        protected $hasGeneratedStyles = false;
 
        /**
-        * Array: Cache for mtime
+        * @var array Cache for mtime
         * @par Usage:
         * @code
         * array( [hash] => [mtime], [hash] => [mtime], ... )
@@ -130,7 +130,7 @@ class ResourceLoaderFileModule extends ResourceLoaderModule {
         */
        protected $modifiedTime = array();
        /**
-        * Array: Place where readStyleFile() tracks file dependencies
+        * @var array Place where readStyleFile() tracks file dependencies
         * @par Usage:
         * @code
         * array( [file-path], [file-path], ... )
@@ -270,7 +270,7 @@ class ResourceLoaderFileModule extends ResourceLoaderModule {
         * Gets all scripts for a given context concatenated together.
         *
         * @param ResourceLoaderContext $context Context in which to generate script
-        * @return string: JavaScript code for $context
+        * @return string JavaScript code for $context
         */
        public function getScript( ResourceLoaderContext $context ) {
                $files = $this->getScriptFiles( $context );
@@ -299,7 +299,7 @@ class ResourceLoaderFileModule extends ResourceLoaderModule {
        /**
         * Gets loader script.
         *
-        * @return string: JavaScript code to be added to startup module
+        * @return string JavaScript code to be added to startup module
         */
        public function getLoaderScript() {
                if ( count( $this->loaderScripts ) == 0 ) {
@@ -312,7 +312,7 @@ class ResourceLoaderFileModule extends ResourceLoaderModule {
         * Gets all styles for a given context concatenated together.
         *
         * @param ResourceLoaderContext $context Context in which to generate styles
-        * @return string: CSS code for $context
+        * @return string CSS code for $context
         */
        public function getStyles( ResourceLoaderContext $context ) {
                $styles = $this->readStyleFiles(
@@ -364,7 +364,7 @@ class ResourceLoaderFileModule extends ResourceLoaderModule {
        /**
         * Gets list of message keys used by this module.
         *
-        * @return array: List of message keys
+        * @return array List of message keys
         */
        public function getMessages() {
                return $this->messages;
@@ -373,7 +373,7 @@ class ResourceLoaderFileModule extends ResourceLoaderModule {
        /**
         * Gets the name of the group this module should be loaded in.
         *
-        * @return string: Group name
+        * @return string Group name
         */
        public function getGroup() {
                return $this->group;
@@ -389,7 +389,7 @@ class ResourceLoaderFileModule extends ResourceLoaderModule {
        /**
         * Gets list of names of modules this module depends on.
         *
-        * @return array: List of module names
+        * @return array List of module names
         */
        public function getDependencies() {
                return $this->dependencies;
@@ -413,7 +413,7 @@ class ResourceLoaderFileModule extends ResourceLoaderModule {
         *
         * @param ResourceLoaderContext $context Context in which to calculate
         *     the modified time
-        * @return int: UNIX timestamp
+        * @return int UNIX timestamp
         * @see ResourceLoaderModule::getFileDependencies
         */
        public function getModifiedTime( ResourceLoaderContext $context ) {
@@ -477,7 +477,7 @@ class ResourceLoaderFileModule extends ResourceLoaderModule {
        /**
         * Get the definition summary for this module.
         *
-        * @return Array
+        * @return array
         */
        public function getDefinitionSummary( ResourceLoaderContext $context ) {
                $summary = array(
@@ -529,7 +529,7 @@ class ResourceLoaderFileModule extends ResourceLoaderModule {
         *
         * @since 1.22
         * @param string $path
-        * @return string: the stylesheet language name
+        * @return string The stylesheet language name
         */
        public function getStyleSheetLang( $path ) {
                return preg_match( '/\.less$/i', $path ) ? 'less' : 'css';
@@ -540,9 +540,9 @@ class ResourceLoaderFileModule extends ResourceLoaderModule {
         *
         * @param array $list List of file paths in any combination of index/path
         *     or path/options pairs
-        * @param string $option option name
-        * @param mixed $default default value if the option isn't set
-        * @return array: List of file paths, collated by $option
+        * @param string $option Option name
+        * @param mixed $default Default value if the option isn't set
+        * @return array List of file paths, collated by $option
         */
        protected static function collateFilePathListByOption( array $list, $option, $default ) {
                $collatedFiles = array();
@@ -571,7 +571,7 @@ class ResourceLoaderFileModule extends ResourceLoaderModule {
         * @param array $list List of lists to select from
         * @param string $key Key to look for in $map
         * @param string $fallback Key to look for in $list if $key doesn't exist
-        * @return array: List of elements from $map which matched $key or $fallback,
+        * @return array List of elements from $map which matched $key or $fallback,
         *     or an empty list in case of no match
         */
        protected static function tryForKey( array $list, $key, $fallback = null ) {
@@ -590,7 +590,7 @@ class ResourceLoaderFileModule extends ResourceLoaderModule {
         * Gets a list of file paths for all scripts in this module, in order of propper execution.
         *
         * @param ResourceLoaderContext $context
-        * @return array: List of file paths
+        * @return array List of file paths
         */
        protected function getScriptFiles( ResourceLoaderContext $context ) {
                $files = array_merge(
@@ -609,7 +609,7 @@ class ResourceLoaderFileModule extends ResourceLoaderModule {
         * Gets a list of file paths for all styles in this module, in order of propper inclusion.
         *
         * @param ResourceLoaderContext $context
-        * @return array: List of file paths
+        * @return array List of file paths
         */
        protected function getStyleFiles( ResourceLoaderContext $context ) {
                return array_merge_recursive(
@@ -644,7 +644,7 @@ class ResourceLoaderFileModule extends ResourceLoaderModule {
         *
         * @param array $scripts List of file paths to scripts to read, remap and concetenate
         * @throws MWException
-        * @return string: Concatenated and remapped JavaScript data from $scripts
+        * @return string Concatenated and remapped JavaScript data from $scripts
         */
        protected function readScriptFiles( array $scripts ) {
                global $wgResourceLoaderValidateStaticJS;
@@ -678,7 +678,7 @@ class ResourceLoaderFileModule extends ResourceLoaderModule {
         * @param bool $flip
         *
         * @throws MWException
-        * @return array: List of concatenated and remapped CSS data from $styles,
+        * @return array List of concatenated and remapped CSS data from $styles,
         *     keyed by media type
         */
        protected function readStyleFiles( array $styles, $flip ) {
@@ -704,7 +704,7 @@ class ResourceLoaderFileModule extends ResourceLoaderModule {
         * @param string $path File path of style file to read
         * @param bool $flip
         *
-        * @return string: CSS data in script file
+        * @return string CSS data in script file
         * @throws MWException if the file doesn't exist
         */
        protected function readStyleFile( $path, $flip ) {
@@ -754,7 +754,7 @@ class ResourceLoaderFileModule extends ResourceLoaderModule {
        /**
         * Get target(s) for the module, eg ['desktop'] or ['desktop', 'mobile']
         *
-        * @return array of strings
+        * @return array Array of strings
         */
        public function getTargets() {
                return $this->targets;
@@ -768,7 +768,7 @@ class ResourceLoaderFileModule extends ResourceLoaderModule {
         *
         * @since 1.22
         * @param string $fileName File name of root LESS file.
-        * @return string: Cache key
+        * @return string Cache key
         */
        protected static function getLESSCacheKey( $fileName ) {
                $vars = json_encode( ResourceLoader::getLESSVars() );
@@ -789,7 +789,7 @@ class ResourceLoaderFileModule extends ResourceLoaderModule {
         * @throws Exception If Less encounters a parse error
         * @throws MWException If Less compilation returns unexpection result
         * @param string $fileName File path of LESS source
-        * @return string: CSS source
+        * @return string CSS source
         */
        protected function compileLESSFile( $fileName ) {
                $key = self::getLESSCacheKey( $fileName );
index 61ed520..8c7fbe7 100644 (file)
@@ -26,7 +26,7 @@
 class ResourceLoaderFilePageModule extends ResourceLoaderWikiModule {
 
        /**
-        * @param $context ResourceLoaderContext
+        * @param ResourceLoaderContext $context
         * @return array
         */
        protected function getPages( ResourceLoaderContext $context ) {
index fa0fbf8..77dcdf9 100644 (file)
@@ -93,8 +93,8 @@ class ResourceLoaderLanguageDataModule extends ResourceLoaderModule {
        }
 
        /**
-        * @param $context ResourceLoaderContext
-        * @return string: JavaScript code
+        * @param ResourceLoaderContext $context
+        * @return string JavaScript code
         */
        public function getScript( ResourceLoaderContext $context ) {
                $this->language = Language::factory( $context->getLanguage() );
@@ -105,16 +105,16 @@ class ResourceLoaderLanguageDataModule extends ResourceLoaderModule {
        }
 
        /**
-        * @param $context ResourceLoaderContext
-        * @return int: UNIX timestamp
+        * @param ResourceLoaderContext $context
+        * @return int UNIX timestamp
         */
        public function getModifiedTime( ResourceLoaderContext $context ) {
                return max( 1, $this->getHashMtime( $context ) );
        }
 
        /**
-        * @param $context ResourceLoaderContext
-        * @return string: Hash
+        * @param ResourceLoaderContext $context
+        * @return string Hash
         */
        public function getModifiedHash( ResourceLoaderContext $context ) {
                $this->language = Language::factory( $context->getLanguage() );
index 429bcec..819bf5a 100644 (file)
@@ -71,7 +71,7 @@ abstract class ResourceLoaderModule {
         * Get this module's name. This is set when the module is registered
         * with ResourceLoader::register()
         *
-        * @return mixed: Name (string) or null if no name was set
+        * @return string|null Name (string) or null if no name was set
         */
        public function getName() {
                return $this->name;
@@ -91,7 +91,7 @@ abstract class ResourceLoaderModule {
         * Get this module's origin. This is set when the module is registered
         * with ResourceLoader::register()
         *
-        * @return int: ResourceLoaderModule class constant, the subclass default
+        * @return int ResourceLoaderModule class constant, the subclass default
         *     if not set manually
         */
        public function getOrigin() {
@@ -102,7 +102,7 @@ abstract class ResourceLoaderModule {
         * Set this module's origin. This is called by ResourceLoader::register()
         * when registering the module. Other code should not call this.
         *
-        * @param int $origin origin
+        * @param int $origin Origin
         */
        public function setOrigin( $origin ) {
                $this->origin = $origin;
@@ -123,7 +123,7 @@ abstract class ResourceLoaderModule {
         * Includes all relevant JS except loader scripts.
         *
         * @param ResourceLoaderContext $context
-        * @return string: JavaScript code
+        * @return string JavaScript code
         */
        public function getScript( ResourceLoaderContext $context ) {
                // Stub, override expected
@@ -142,7 +142,7 @@ abstract class ResourceLoaderModule {
         * MUST return either an only= URL or a non-load.php URL.
         *
         * @param ResourceLoaderContext $context
-        * @return array: Array of URLs
+        * @return array Array of URLs
         */
        public function getScriptURLsForDebug( ResourceLoaderContext $context ) {
                $url = ResourceLoader::makeLoaderURL(
@@ -173,7 +173,7 @@ abstract class ResourceLoaderModule {
         * Get all CSS for this module for a given skin.
         *
         * @param ResourceLoaderContext $context
-        * @return array: List of CSS strings or array of CSS strings keyed by media type.
+        * @return array List of CSS strings or array of CSS strings keyed by media type.
         *  like array( 'screen' => '.foo { width: 0 }' );
         *  or array( 'screen' => array( '.foo { width: 0 }' ) );
         */
@@ -189,7 +189,7 @@ abstract class ResourceLoaderModule {
         * load the files directly. See also getScriptURLsForDebug()
         *
         * @param ResourceLoaderContext $context
-        * @return array: array( mediaType => array( URL1, URL2, ... ), ... )
+        * @return array array( mediaType => array( URL1, URL2, ... ), ... )
         */
        public function getStyleURLsForDebug( ResourceLoaderContext $context ) {
                $url = ResourceLoader::makeLoaderURL(
@@ -211,7 +211,7 @@ abstract class ResourceLoaderModule {
         *
         * To get a JSON blob with messages, use MessageBlobStore::get()
         *
-        * @return array: List of message keys. Keys may occur more than once
+        * @return array List of message keys. Keys may occur more than once
         */
        public function getMessages() {
                // Stub, override expected
@@ -221,7 +221,7 @@ abstract class ResourceLoaderModule {
        /**
         * Get the group this module is in.
         *
-        * @return string: Group name
+        * @return string Group name
         */
        public function getGroup() {
                // Stub, override expected
@@ -231,7 +231,7 @@ abstract class ResourceLoaderModule {
        /**
         * Get the origin of this module. Should only be overridden for foreign modules.
         *
-        * @return string: Origin name, 'local' for local modules
+        * @return string Origin name, 'local' for local modules
         */
        public function getSource() {
                // Stub, override expected
@@ -263,7 +263,7 @@ abstract class ResourceLoaderModule {
        /**
         * Get the loader JS for this module, if set.
         *
-        * @return mixed: JavaScript loader code as a string or boolean false if no custom loader set
+        * @return mixed JavaScript loader code as a string or boolean false if no custom loader set
         */
        public function getLoaderScript() {
                // Stub, override expected
@@ -278,7 +278,7 @@ abstract class ResourceLoaderModule {
         *
         * To add dependencies dynamically on the client side, use a custom
         * loader script, see getLoaderScript()
-        * @return array: List of module names as strings
+        * @return array List of module names as strings
         */
        public function getDependencies() {
                // Stub, override expected
@@ -288,7 +288,7 @@ abstract class ResourceLoaderModule {
        /**
         * Get target(s) for the module, eg ['desktop'] or ['desktop', 'mobile']
         *
-        * @return array: Array of strings
+        * @return array Array of strings
         */
        public function getTargets() {
                return $this->targets;
@@ -299,7 +299,7 @@ abstract class ResourceLoaderModule {
         * Currently these are only image files referenced by the module's CSS.
         *
         * @param string $skin Skin name
-        * @return array: List of files
+        * @return array List of files
         */
        public function getFileDependencies( $skin ) {
                // Try in-object cache first
@@ -335,7 +335,7 @@ abstract class ResourceLoaderModule {
         * Get the last modification timestamp of the message blob for this
         * module in a given language.
         * @param string $lang Language code
-        * @return int: UNIX timestamp, or 0 if the module doesn't have messages
+        * @return int UNIX timestamp, or 0 if the module doesn't have messages
         */
        public function getMsgBlobMtime( $lang ) {
                if ( !isset( $this->msgBlobMtime[$lang] ) ) {
@@ -363,7 +363,7 @@ abstract class ResourceLoaderModule {
         * Set a preloaded message blob last modification timestamp. Used so we
         * can load this information for all modules at once.
         * @param string $lang Language code
-        * @param $mtime Integer: UNIX timestamp or 0 if there is no such blob
+        * @param int $mtime UNIX timestamp or 0 if there is no such blob
         */
        public function setMsgBlobMtime( $lang, $mtime ) {
                $this->msgBlobMtime[$lang] = $mtime;
@@ -387,7 +387,7 @@ abstract class ResourceLoaderModule {
         * yourself and take its result into consideration.
         *
         * @param ResourceLoaderContext $context Context object
-        * @return integer UNIX timestamp
+        * @return int UNIX timestamp
         */
        public function getModifiedTime( ResourceLoaderContext $context ) {
                // 0 would mean now
@@ -398,7 +398,7 @@ abstract class ResourceLoaderModule {
         * Helper method for calculating when the module's hash (if it has one) changed.
         *
         * @param ResourceLoaderContext $context
-        * @return integer: UNIX timestamp or 0 if no hash was provided
+        * @return int UNIX timestamp or 0 if no hash was provided
         *  by getModifiedHash()
         */
        public function getHashMtime( ResourceLoaderContext $context ) {
@@ -432,7 +432,7 @@ abstract class ResourceLoaderModule {
         * use of getHashMTime() inside getModifiedTime().
         *
         * @param ResourceLoaderContext $context
-        * @return string|null: Hash
+        * @return string|null Hash
         */
        public function getModifiedHash( ResourceLoaderContext $context ) {
                return null;
@@ -441,7 +441,7 @@ abstract class ResourceLoaderModule {
        /**
         * Helper method for calculating when this module's definition summary was last changed.
         *
-        * @return integer: UNIX timestamp or 0 if no definition summary was provided
+        * @return int UNIX timestamp or 0 if no definition summary was provided
         *  by getDefinitionSummary()
         */
        public function getDefinitionMtime( ResourceLoaderContext $context ) {
@@ -505,7 +505,7 @@ abstract class ResourceLoaderModule {
         * contain arrays and scalars as values (avoid object instances) which means
         * it requires abstraction.
         *
-        * @return Array|null
+        * @return array|null
         */
        public function getDefinitionSummary( ResourceLoaderContext $context ) {
                return array(
@@ -536,7 +536,7 @@ abstract class ResourceLoaderModule {
         *
         * @param string $fileName
         * @param string $contents
-        * @return string: JS with the original, or a replacement error
+        * @return string JS with the original, or a replacement error
         */
        protected function validateScriptFile( $fileName, $contents ) {
                global $wgResourceLoaderValidateJS;
index bd026f3..61927d7 100644 (file)
@@ -33,9 +33,9 @@ class ResourceLoaderNoscriptModule extends ResourceLoaderWikiModule {
         * Gets list of pages used by this module.  Obviously, it makes absolutely no
         * sense to include JavaScript files here... :D
         *
-        * @param $context ResourceLoaderContext
+        * @param ResourceLoaderContext $context
         *
-        * @return Array: List of pages
+        * @return array List of pages
         */
        protected function getPages( ResourceLoaderContext $context ) {
                return array( 'MediaWiki:Noscript.css' => array( 'type' => 'style' ) );
@@ -46,7 +46,7 @@ class ResourceLoaderNoscriptModule extends ResourceLoaderWikiModule {
        /**
         * Gets group name
         *
-        * @return String: Name of group
+        * @return string Name of group
         */
        public function getGroup() {
                return 'noscript';
index 05754d3..d28f40f 100644 (file)
@@ -32,9 +32,9 @@ class ResourceLoaderSiteModule extends ResourceLoaderWikiModule {
        /**
         * Gets list of pages used by this module
         *
-        * @param $context ResourceLoaderContext
+        * @param ResourceLoaderContext $context
         *
-        * @return Array: List of pages
+        * @return array List of pages
         */
        protected function getPages( ResourceLoaderContext $context ) {
                global $wgUseSiteJs, $wgUseSiteCss;
@@ -58,7 +58,7 @@ class ResourceLoaderSiteModule extends ResourceLoaderWikiModule {
        /**
         * Gets group name
         *
-        * @return String: Name of group
+        * @return string Name of group
         */
        public function getGroup() {
                return 'site';
index 005081c..dc32959 100644 (file)
@@ -120,7 +120,7 @@ class ResourceLoaderStartUpModule extends ResourceLoaderModule {
        /**
         * Get registration code for all modules.
         *
-        * @param ResourceLoaderContext $context object
+        * @param ResourceLoaderContext $context
         * @return string JavaScript code for registering all modules with the client loader
         */
        public static function getModuleRegistrations( ResourceLoaderContext $context ) {
@@ -345,8 +345,8 @@ class ResourceLoaderStartUpModule extends ResourceLoaderModule {
         *
         * Detect changes to mw.config settings embedded in #getScript (bug 28899).
         *
-        * @param $context ResourceLoaderContext
-        * @return string: Hash
+        * @param ResourceLoaderContext $context
+        * @return string Hash
         */
        public function getModifiedHash( ResourceLoaderContext $context ) {
                global $wgLegacyJavaScriptGlobals;
index 8ce0ca7..082a65c 100644 (file)
@@ -36,8 +36,8 @@ class ResourceLoaderUserCSSPrefsModule extends ResourceLoaderModule {
        /* Methods */
 
        /**
-        * @param $context ResourceLoaderContext
-        * @return array|int|Mixed
+        * @param ResourceLoaderContext $context
+        * @return array|int|mixed
         */
        public function getModifiedTime( ResourceLoaderContext $context ) {
                $hash = $context->getHash();
@@ -50,7 +50,7 @@ class ResourceLoaderUserCSSPrefsModule extends ResourceLoaderModule {
        }
 
        /**
-        * @param $context ResourceLoaderContext
+        * @param ResourceLoaderContext $context
         * @return array
         */
        public function getStyles( ResourceLoaderContext $context ) {
index 6757d39..680c74c 100644 (file)
@@ -33,7 +33,7 @@ class ResourceLoaderUserGroupsModule extends ResourceLoaderWikiModule {
        /* Protected Methods */
 
        /**
-        * @param $context ResourceLoaderContext
+        * @param ResourceLoaderContext $context
         * @return array
         */
        protected function getPages( ResourceLoaderContext $context ) {
index 7454b65..90b4838 100644 (file)
@@ -34,7 +34,7 @@ class ResourceLoaderUserModule extends ResourceLoaderWikiModule {
        /* Protected Methods */
 
        /**
-        * @param $context ResourceLoaderContext
+        * @param ResourceLoaderContext $context
         * @return array
         */
        protected function getPages( ResourceLoaderContext $context ) {
index 3686bea..bd97a8e 100644 (file)
@@ -38,8 +38,8 @@ class ResourceLoaderUserOptionsModule extends ResourceLoaderModule {
        /* Methods */
 
        /**
-        * @param $context ResourceLoaderContext
-        * @return array|int|Mixed
+        * @param ResourceLoaderContext $context
+        * @return array|int|mixed
         */
        public function getModifiedTime( ResourceLoaderContext $context ) {
                $hash = $context->getHash();
@@ -52,7 +52,7 @@ class ResourceLoaderUserOptionsModule extends ResourceLoaderModule {
        }
 
        /**
-        * @param $context ResourceLoaderContext
+        * @param ResourceLoaderContext $context
         * @return string
         */
        public function getScript( ResourceLoaderContext $context ) {
index cdc9611..e652422 100644 (file)
@@ -37,7 +37,7 @@ class ResourceLoaderUserTokensModule extends ResourceLoaderModule {
        /**
         * Fetch the tokens for the current user.
         *
-        * @return array: List of tokens keyed by token type
+        * @return array List of tokens keyed by token type
         */
        protected function contextUserTokens() {
                global $wgUser;
@@ -50,7 +50,7 @@ class ResourceLoaderUserTokensModule extends ResourceLoaderModule {
        }
 
        /**
-        * @param $context ResourceLoaderContext
+        * @param ResourceLoaderContext $context
         * @return string
         */
        public function getScript( ResourceLoaderContext $context ) {
index f275a6b..bfb3c42 100644 (file)
@@ -54,7 +54,7 @@ abstract class ResourceLoaderWikiModule extends ResourceLoaderModule {
         * There is an optional media key, the value of which can be the
         * medium ('screen', 'print', etc.) of the stylesheet.
         *
-        * @param $context ResourceLoaderContext
+        * @param ResourceLoaderContext $context
         * @return array
         */
        abstract protected function getPages( ResourceLoaderContext $context );
@@ -77,7 +77,7 @@ abstract class ResourceLoaderWikiModule extends ResourceLoaderModule {
        }
 
        /**
-        * @param $title Title
+        * @param Title $title
         * @return null|string
         */
        protected function getContent( $title ) {
@@ -109,7 +109,7 @@ abstract class ResourceLoaderWikiModule extends ResourceLoaderModule {
        /* Methods */
 
        /**
-        * @param $context ResourceLoaderContext
+        * @param ResourceLoaderContext $context
         * @return string
         */
        public function getScript( ResourceLoaderContext $context ) {
@@ -132,7 +132,7 @@ abstract class ResourceLoaderWikiModule extends ResourceLoaderModule {
        }
 
        /**
-        * @param $context ResourceLoaderContext
+        * @param ResourceLoaderContext $context
         * @return array
         */
        public function getStyles( ResourceLoaderContext $context ) {
@@ -166,7 +166,7 @@ abstract class ResourceLoaderWikiModule extends ResourceLoaderModule {
        }
 
        /**
-        * @param $context ResourceLoaderContext
+        * @param ResourceLoaderContext $context
         * @return int|mixed
         */
        public function getModifiedTime( ResourceLoaderContext $context ) {
@@ -186,7 +186,7 @@ abstract class ResourceLoaderWikiModule extends ResourceLoaderModule {
        /**
         * Get the definition summary for this module.
         *
-        * @return Array
+        * @return array
         */
        public function getDefinitionSummary( ResourceLoaderContext $context ) {
                return array(
@@ -196,7 +196,7 @@ abstract class ResourceLoaderWikiModule extends ResourceLoaderModule {
        }
 
        /**
-        * @param $context ResourceLoaderContext
+        * @param ResourceLoaderContext $context
         * @return bool
         */
        public function isKnownEmpty( ResourceLoaderContext $context ) {
@@ -206,7 +206,7 @@ abstract class ResourceLoaderWikiModule extends ResourceLoaderModule {
        /**
         * Get the modification times of all titles that would be loaded for
         * a given context.
-        * @param $context ResourceLoaderContext: Context object
+        * @param ResourceLoaderContext $context Context object
         * @return array( prefixed DB key => UNIX timestamp ), nonexistent titles are dropped
         */
        protected function getTitleMtimes( ResourceLoaderContext $context ) {
index 687f9a4..827d8c3 100644 (file)
@@ -37,7 +37,7 @@ class SearchEngine {
        var $namespaces = array( NS_MAIN );
        protected $showSuggestion = true;
 
-       /** @var Array Feature values */
+       /** @var array Feature values */
        protected $features = array();
 
        /**
@@ -45,7 +45,7 @@ class SearchEngine {
         * If title searches are not supported or disabled, return null.
         * STUB
         *
-        * @param string $term raw search term
+        * @param string $term Raw search term
         * @return SearchResultSet|Status|null
         */
        function searchText( $term ) {
@@ -57,7 +57,7 @@ class SearchEngine {
         * If title searches are not supported or disabled, return null.
         * STUB
         *
-        * @param string $term raw search term
+        * @param string $term Raw search term
         * @return SearchResultSet|null
         */
        function searchTitle( $term ) {
@@ -66,8 +66,8 @@ class SearchEngine {
 
        /**
         * @since 1.18
-        * @param $feature String
-        * @return Boolean
+        * @param string $feature
+        * @return bool
         */
        public function supports( $feature ) {
                switch ( $feature ) {
@@ -82,8 +82,8 @@ class SearchEngine {
        /**
         * Way to pass custom data for engines
         * @since 1.18
-        * @param $feature String
-        * @param $data Mixed
+        * @param string $feature
+        * @param mixed $data
         * @return bool
         */
        public function setFeatureData( $feature, $data ) {
@@ -117,7 +117,7 @@ class SearchEngine {
         * If an exact title match can be found, or a very slightly close match,
         * return the title. If no match, returns NULL.
         *
-        * @param $searchterm String
+        * @param string $searchterm
         * @return Title
         */
        public static function getNearMatch( $searchterm ) {
@@ -131,7 +131,7 @@ class SearchEngine {
         * Do a near match (see SearchEngine::getNearMatch) and wrap it into a
         * SearchResultSet.
         *
-        * @param $searchterm string
+        * @param string $searchterm
         * @return SearchResultSet
         */
        public static function getNearMatchResultSet( $searchterm ) {
@@ -262,8 +262,8 @@ class SearchEngine {
         * Set the maximum number of results to return
         * and how many to skip before returning the first.
         *
-        * @param $limit Integer
-        * @param $offset Integer
+        * @param int $limit
+        * @param int $offset
         */
        function setLimitOffset( $limit, $offset = 0 ) {
                $this->limit = intval( $limit );
@@ -274,7 +274,7 @@ class SearchEngine {
         * Set which namespaces the search should include.
         * Give an array of namespace index numbers.
         *
-        * @param $namespaces Array
+        * @param array $namespaces
         */
        function setNamespaces( $namespaces ) {
                $this->namespaces = $namespaces;
@@ -285,7 +285,7 @@ class SearchEngine {
         * don't support building a suggestion in the first place and others don't respect
         * this flag.
         *
-        * @param boolean $showSuggestion should the searcher try to build suggestions
+        * @param bool $showSuggestion Should the searcher try to build suggestions
         */
        function setShowSuggestion( $showSuggestion ) {
                $this->showSuggestion = $showSuggestion;
@@ -295,7 +295,7 @@ class SearchEngine {
         * Parse some common prefixes: all (search everything)
         * or namespace names
         *
-        * @param $query String
+        * @param string $query
         * @return string
         */
        function replacePrefixes( $query ) {
@@ -330,7 +330,7 @@ class SearchEngine {
 
        /**
         * Make a list of searchable namespaces and their canonical names.
-        * @return Array
+        * @return array
         */
        public static function searchableNamespaces() {
                global $wgContLang;
@@ -349,8 +349,8 @@ class SearchEngine {
         * Extract default namespaces to search from the given user's
         * settings, returning a list of index numbers.
         *
-        * @param $user User
-        * @return Array
+        * @param user $user
+        * @return array
         */
        public static function userNamespaces( $user ) {
                global $wgSearchEverythingOnlyLoggedIn;
@@ -378,7 +378,7 @@ class SearchEngine {
        /**
         * Find snippet highlight settings for all users
         *
-        * @return Array contextlines, contextchars
+        * @return array Contextlines, contextchars
         */
        public static function userHighlightPrefs() {
                $contextlines = 2; // Hardcode this. Old defaults sucked. :)
@@ -389,7 +389,7 @@ class SearchEngine {
        /**
         * An array of namespaces indexes to be searched by default
         *
-        * @return Array
+        * @return array
         */
        public static function defaultNamespaces() {
                global $wgNamespacesToBeSearchedDefault;
@@ -401,7 +401,7 @@ class SearchEngine {
         * Get a list of namespace names useful for showing in tooltips
         * and preferences
         *
-        * @param $namespaces Array
+        * @param array $namespaces
         * @return array
         */
        public static function namespacesAsText( $namespaces ) {
@@ -419,7 +419,7 @@ class SearchEngine {
        /**
         * Return the help namespaces to be shown on Special:Search
         *
-        * @return Array
+        * @return array
         */
        public static function helpNamespaces() {
                global $wgNamespacesToBeSearchedHelp;
@@ -430,8 +430,8 @@ class SearchEngine {
        /**
         * Return a 'cleaned up' search string
         *
-        * @param $text String
-        * @return String
+        * @param string $text
+        * @return string
         */
        function filter( $text ) {
                $lc = $this->legalSearchChars();
@@ -442,7 +442,7 @@ class SearchEngine {
         * Load up the appropriate search engine class for the currently
         * active database backend, and return a configured instance.
         *
-        * @param String $type Type of search backend, if not the default
+        * @param string $type Type of search backend, if not the default
         * @return SearchEngine
         */
        public static function create( $type = null ) {
@@ -484,9 +484,9 @@ class SearchEngine {
         * Title and text should be pre-processed.
         * STUB
         *
-        * @param $id Integer
-        * @param $title String
-        * @param $text String
+        * @param int $id
+        * @param string $title
+        * @param string $text
         */
        function update( $id, $title, $text ) {
                // no-op
@@ -497,8 +497,8 @@ class SearchEngine {
         * Title should be pre-processed.
         * STUB
         *
-        * @param $id Integer
-        * @param $title String
+        * @param int $id
+        * @param string $title
         */
        function updateTitle( $id, $title ) {
                // no-op
@@ -509,8 +509,8 @@ class SearchEngine {
         * Title should be pre-processed.
         * STUB
         *
-        * @param Integer $id Page id that was deleted
-        * @param String $title Title of page that was deleted
+        * @param int $id Page id that was deleted
+        * @param string $title Title of page that was deleted
         */
        function delete( $id, $title ) {
                // no-op
@@ -519,7 +519,7 @@ class SearchEngine {
        /**
         * Get OpenSearch suggestion template
         *
-        * @return String
+        * @return string
         */
        public static function getOpenSearchTemplate() {
                global $wgOpenSearchTemplate, $wgCanonicalServer;
index 4c8aea5..5e734fe 100644 (file)
@@ -36,11 +36,11 @@ class SearchHighlighter {
        /**
         * Default implementation of wikitext highlighting
         *
-        * @param $text String
-        * @param array $terms terms to highlight (unescaped)
-        * @param $contextlines Integer
-        * @param $contextchars Integer
-        * @return String
+        * @param string $text
+        * @param array $terms Terms to highlight (unescaped)
+        * @param int $contextlines
+        * @param int $contextchars
+        * @return tring
         */
        public function highlightText( $text, $terms, $contextlines, $contextchars ) {
                global $wgContLang;
@@ -285,8 +285,8 @@ class SearchHighlighter {
         * Split text into lines and add it to extracts array
         *
         * @param array $extracts index -> $line
-        * @param $count Integer
-        * @param $text String
+        * @param int $count
+        * @param string $text
         */
        function splitAndAdd( &$extracts, &$count, $text ) {
                $split = explode( "\n", $this->mCleanWikitext ? $this->removeWiki( $text ) : $text );
@@ -301,7 +301,7 @@ class SearchHighlighter {
        /**
         * Do manual case conversion for non-ascii chars
         *
-        * @param $matches Array
+        * @param array $matches
         * @return string
         */
        function caseCallback( $matches ) {
@@ -316,12 +316,12 @@ class SearchHighlighter {
        /**
         * Extract part of the text from start to end, but by
         * not chopping up words
-        * @param $text String
-        * @param $start Integer
-        * @param $end Integer
-        * @param $posStart Integer: (out) actual start position
-        * @param $posEnd Integer: (out) actual end position
-        * @return String
+        * @param string $text
+        * @param int $start
+        * @param int $end
+        * @param int $posStart (out) actual start position
+        * @param int $posEnd (out) actual end position
+        * @return string
         */
        function extract( $text, $start, $end, &$posStart = null, &$posEnd = null ) {
                if ( $start != 0 ) {
@@ -350,10 +350,10 @@ class SearchHighlighter {
        /**
         * Find a nonletter near a point (index) in the text
         *
-        * @param $text String
-        * @param $point Integer
-        * @param $offset Integer: offset to found index
-        * @return Integer: nearest nonletter index, or beginning of utf8 char if none
+        * @param string $text
+        * @param int $point
+        * @param int $offset Offset to found index
+        * @return int Nearest nonletter index, or beginning of utf8 char if none
         */
        function position( $text, $point, $offset = 0 ) {
                $tolerance = 10;
@@ -381,12 +381,12 @@ class SearchHighlighter {
        /**
         * Search extracts for a pattern, and return snippets
         *
-        * @param string $pattern regexp for matching lines
-        * @param array $extracts extracts to search
-        * @param $linesleft Integer: number of extracts to make
-        * @param $contextchars Integer: length of snippet
-        * @param array $out map for highlighted snippets
-        * @param array $offsets map of starting points of snippets
+        * @param string $pattern Regexp for matching lines
+        * @param array $extracts Extracts to search
+        * @param int $linesleft Number of extracts to make
+        * @param int $contextchars Length of snippet
+        * @param array $out Map for highlighted snippets
+        * @param array $offsets Map of starting points of snippets
         * @protected
         */
        function process( $pattern, $extracts, &$linesleft, &$contextchars, &$out, &$offsets ) {
@@ -459,7 +459,7 @@ class SearchHighlighter {
         * callback to replace [[target|caption]] kind of links, if
         * the target is category or image, leave it
         *
-        * @param $matches Array
+        * @param array $matches
         */
        function linkReplace( $matches ) {
                $colon = strpos( $matches[1], ':' );
@@ -480,11 +480,11 @@ class SearchHighlighter {
         * Simple & fast snippet extraction, but gives completely unrelevant
         * snippets
         *
-        * @param $text String
-        * @param $terms Array
-        * @param $contextlines Integer
-        * @param $contextchars Integer
-        * @return String
+        * @param string $text
+        * @param array $terms
+        * @param int $contextlines
+        * @param int $contextchars
+        * @return string
         */
        public function highlightSimple( $text, $terms, $contextlines, $contextchars ) {
                global $wgContLang;
index d92c9c8..6326112 100644 (file)
@@ -29,7 +29,7 @@ class SearchMssql extends SearchDatabase {
        /**
         * Perform a full text search query and return a result set.
         *
-        * @param string $term raw search term
+        * @param string $term Raw search term
         * @return MssqlSearchResultSet
         * @access public
         */
@@ -41,7 +41,7 @@ class SearchMssql extends SearchDatabase {
        /**
         * Perform a title-only search query and return a result set.
         *
-        * @param string $term raw search term
+        * @param string $term Raw search term
         * @return MssqlSearchResultSet
         * @access public
         */
@@ -53,7 +53,7 @@ class SearchMssql extends SearchDatabase {
        /**
         * Return a partial WHERE clause to limit the search to the given namespaces
         *
-        * @return String
+        * @return string
         * @private
         */
        function queryNamespaces() {
@@ -67,9 +67,9 @@ class SearchMssql extends SearchDatabase {
        /**
         * Return a LIMIT clause to limit results on the query.
         *
-        * @param $sql string
+        * @param string $sql
         *
-        * @return String
+        * @return string
         */
        function queryLimit( $sql ) {
                return $this->db->limitResult( $sql, $this->limit, $this->offset );
@@ -79,7 +79,7 @@ class SearchMssql extends SearchDatabase {
         * Does not do anything for generic search engine
         * subclasses may define this though
         *
-        * @return String
+        * @return string
         */
        function queryRanking( $filteredTerm, $fulltext ) {
                return ' ORDER BY ftindex.[RANK] DESC'; // return ' ORDER BY score(1)';
@@ -89,9 +89,9 @@ class SearchMssql extends SearchDatabase {
         * Construct the full SQL query to do the search.
         * The guts shoulds be constructed in queryMain()
         *
-        * @param $filteredTerm String
-        * @param $fulltext Boolean
-        * @return String
+        * @param string $filteredTerm
+        * @param bool $fulltext
+        * @return string
         */
        function getQuery( $filteredTerm, $fulltext ) {
                return $this->queryLimit( $this->queryMain( $filteredTerm, $fulltext ) . ' ' .
@@ -102,7 +102,7 @@ class SearchMssql extends SearchDatabase {
        /**
         * Picks which field to index on, depending on what type of query.
         *
-        * @param $fulltext Boolean
+        * @param bool $fulltext
         * @return string
         */
        function getIndexField( $fulltext ) {
@@ -112,9 +112,9 @@ class SearchMssql extends SearchDatabase {
        /**
         * Get the base part of the search query.
         *
-        * @param $filteredTerm String
-        * @param $fulltext Boolean
-        * @return String
+        * @param string $filteredTerm
+        * @param bool $fulltext
+        * @return string
         * @private
         */
        function queryMain( $filteredTerm, $fulltext ) {
@@ -165,9 +165,9 @@ class SearchMssql extends SearchDatabase {
         * Create or update the search index record for the given page.
         * Title and text should be pre-processed.
         *
-        * @param $id Integer
-        * @param $title String
-        * @param $text String
+        * @param int $id
+        * @param string $title
+        * @param string $text
         * @return bool|ResultWrapper
         */
        function update( $id, $title, $text ) {
@@ -189,8 +189,8 @@ class SearchMssql extends SearchDatabase {
         * Update a search index record's title only.
         * Title should be pre-processed.
         *
-        * @param $id Integer
-        * @param $title String
+        * @param int $id
+        * @param string $title
         * @return bool|ResultWrapper
         */
        function updateTitle( $id, $title ) {
index c4d7d1e..cfe4c29 100644 (file)
@@ -36,8 +36,8 @@ class SearchMySQL extends SearchDatabase {
         * Parse the user's query and transform it into an SQL fragment which will
         * become part of a WHERE clause
         *
-        * @param $filteredText string
-        * @param $fulltext string
+        * @param string $filteredText
+        * @param string $fulltext
         *
         * @return string
         */
@@ -152,7 +152,7 @@ class SearchMySQL extends SearchDatabase {
        /**
         * Perform a full text search query and return a result set.
         *
-        * @param string $term raw search term
+        * @param string $term Raw search term
         * @return MySQLSearchResultSet
         */
        function searchText( $term ) {
@@ -162,7 +162,7 @@ class SearchMySQL extends SearchDatabase {
        /**
         * Perform a title-only search query and return a result set.
         *
-        * @param string $term raw search term
+        * @param string $term Raw search term
         * @return MySQLSearchResultSet
         */
        function searchTitle( $term ) {
@@ -213,7 +213,7 @@ class SearchMySQL extends SearchDatabase {
 
        /**
         * Add special conditions
-        * @param $query Array
+        * @param array $query
         * @since 1.18
         */
        protected function queryFeatures( &$query ) {
@@ -226,7 +226,7 @@ class SearchMySQL extends SearchDatabase {
 
        /**
         * Add namespace conditions
-        * @param $query Array
+        * @param array $query
         * @since 1.18 (changed)
         */
        function queryNamespaces( &$query ) {
@@ -240,7 +240,7 @@ class SearchMySQL extends SearchDatabase {
 
        /**
         * Add limit options
-        * @param $query Array
+        * @param array $query
         * @since 1.18
         */
        protected function limitResult( &$query ) {
@@ -251,9 +251,9 @@ class SearchMySQL extends SearchDatabase {
        /**
         * Construct the SQL query to do the search.
         * The guts shoulds be constructed in queryMain()
-        * @param $filteredTerm String
-        * @param $fulltext Boolean
-        * @return Array
+        * @param string $filteredTerm
+        * @param bool $fulltext
+        * @return array
         * @since 1.18 (changed)
         */
        function getQuery( $filteredTerm, $fulltext ) {
@@ -275,8 +275,8 @@ class SearchMySQL extends SearchDatabase {
 
        /**
         * Picks which field to index on, depending on what type of query.
-        * @param $fulltext Boolean
-        * @return String
+        * @param bool $fulltext
+        * @return string
         */
        function getIndexField( $fulltext ) {
                return $fulltext ? 'si_text' : 'si_title';
@@ -285,9 +285,9 @@ class SearchMySQL extends SearchDatabase {
        /**
         * Get the base part of the search query.
         *
-        * @param &$query array Search query array
-        * @param $filteredTerm String
-        * @param $fulltext Boolean
+        * @param array &$query Search query array
+        * @param string $filteredTerm
+        * @param bool $fulltext
         * @since 1.18 (changed)
         */
        function queryMain( &$query, $filteredTerm, $fulltext ) {
@@ -326,9 +326,9 @@ class SearchMySQL extends SearchDatabase {
         * Create or update the search index record for the given page.
         * Title and text should be pre-processed.
         *
-        * @param $id Integer
-        * @param $title String
-        * @param $text String
+        * @param int $id
+        * @param string $title
+        * @param string $text
         */
        function update( $id, $title, $text ) {
                $dbw = wfGetDB( DB_MASTER );
@@ -345,8 +345,8 @@ class SearchMySQL extends SearchDatabase {
         * Update a search index record's title only.
         * Title should be pre-processed.
         *
-        * @param $id Integer
-        * @param $title String
+        * @param int $id
+        * @param string $title
         */
        function updateTitle( $id, $title ) {
                $dbw = wfGetDB( DB_MASTER );
@@ -362,8 +362,8 @@ class SearchMySQL extends SearchDatabase {
         * Delete an indexed page
         * Title should be pre-processed.
         *
-        * @param Integer $id Page id that was deleted
-        * @param String $title Title of page that was deleted
+        * @param int $id Page id that was deleted
+        * @param string $title Title of page that was deleted
         */
        function delete( $id, $title ) {
                $dbw = wfGetDB( DB_MASTER );
index e14de2c..d5a6597 100644 (file)
@@ -62,7 +62,7 @@ class SearchOracle extends SearchDatabase {
        /**
         * Perform a full text search query and return a result set.
         *
-        * @param string $term raw search term
+        * @param string $term Raw search term
         * @return SqlSearchResultSet
         */
        function searchText( $term ) {
@@ -77,7 +77,7 @@ class SearchOracle extends SearchDatabase {
        /**
         * Perform a title-only search query and return a result set.
         *
-        * @param string $term raw search term
+        * @param string $term Raw search term
         * @return SqlSearchResultSet
         */
        function searchTitle( $term ) {
@@ -91,7 +91,7 @@ class SearchOracle extends SearchDatabase {
 
        /**
         * Return a partial WHERE clause to limit the search to the given namespaces
-        * @return String
+        * @return string
         */
        function queryNamespaces() {
                if ( is_null( $this->namespaces ) ) {
@@ -108,9 +108,9 @@ class SearchOracle extends SearchDatabase {
        /**
         * Return a LIMIT clause to limit results on the query.
         *
-        * @param $sql string
+        * @param string $sql
         *
-        * @return String
+        * @return string
         */
        function queryLimit( $sql ) {
                return $this->db->limitResult( $sql, $this->limit, $this->offset );
@@ -120,7 +120,7 @@ class SearchOracle extends SearchDatabase {
         * Does not do anything for generic search engine
         * subclasses may define this though
         *
-        * @return String
+        * @return string
         */
        function queryRanking( $filteredTerm, $fulltext ) {
                return ' ORDER BY score(1)';
@@ -129,9 +129,9 @@ class SearchOracle extends SearchDatabase {
        /**
         * Construct the full SQL query to do the search.
         * The guts shoulds be constructed in queryMain()
-        * @param $filteredTerm String
-        * @param $fulltext Boolean
-        * @return String
+        * @param string $filteredTerm
+        * @param bool $fulltext
+        * @return string
         */
        function getQuery( $filteredTerm, $fulltext ) {
                return $this->queryLimit( $this->queryMain( $filteredTerm, $fulltext ) . ' ' .
@@ -141,8 +141,8 @@ class SearchOracle extends SearchDatabase {
 
        /**
         * Picks which field to index on, depending on what type of query.
-        * @param $fulltext Boolean
-        * @return String
+        * @param bool $fulltext
+        * @return string
         */
        function getIndexField( $fulltext ) {
                return $fulltext ? 'si_text' : 'si_title';
@@ -151,9 +151,9 @@ class SearchOracle extends SearchDatabase {
        /**
         * Get the base part of the search query.
         *
-        * @param $filteredTerm String
-        * @param $fulltext Boolean
-        * @return String
+        * @param string $filteredTerm
+        * @param bool $fulltext
+        * @return string
         */
        function queryMain( $filteredTerm, $fulltext ) {
                $match = $this->parseQuery( $filteredTerm, $fulltext );
@@ -222,9 +222,9 @@ class SearchOracle extends SearchDatabase {
         * Create or update the search index record for the given page.
         * Title and text should be pre-processed.
         *
-        * @param $id Integer
-        * @param $title String
-        * @param $text String
+        * @param int $id
+        * @param string $title
+        * @param string $text
         */
        function update( $id, $title, $text ) {
                $dbw = wfGetDB( DB_MASTER );
@@ -251,8 +251,8 @@ class SearchOracle extends SearchDatabase {
         * Update a search index record's title only.
         * Title should be pre-processed.
         *
-        * @param $id Integer
-        * @param $title String
+        * @param int $id
+        * @param string $title
         */
        function updateTitle( $id, $title ) {
                $dbw = wfGetDB( DB_MASTER );
index 4da63b3..cb81aaa 100644 (file)
@@ -34,7 +34,7 @@ class SearchPostgres extends SearchDatabase {
         * Currently searches a page's current title (page.page_title) and
         * latest revision article text (pagecontent.old_text)
         *
-        * @param string $term raw search term
+        * @param string $term Raw search term
         * @return PostgresSearchResultSet
         */
        function searchTitle( $term ) {
@@ -64,7 +64,7 @@ class SearchPostgres extends SearchDatabase {
         * Transform the user's search string into a better form for tsearch2
         * Returns an SQL fragment consisting of quoted text to search for.
         *
-        * @param $term string
+        * @param string $term
         *
         * @return string
         */
@@ -130,9 +130,9 @@ class SearchPostgres extends SearchDatabase {
 
        /**
         * Construct the full SQL query to do the search.
-        * @param $term String
-        * @param $fulltext String
-        * @param $colname
+        * @param string $term
+        * @param string $fulltext
+        * @param string $colname
         * @return string
         */
        function searchQuery( $term, $fulltext, $colname ) {
index 153590a..56ae2ff 100644 (file)
@@ -45,14 +45,14 @@ class SearchResult {
        protected $mTitle;
 
        /**
-        * @var String
+        * @var string
         */
        protected $mText;
 
        /**
         * Return a new SearchResult and initializes it with a title.
         *
-        * @param $title Title
+        * @param Title $title
         * @return SearchResult
         */
        public static function newFromTitle( $title ) {
@@ -64,7 +64,7 @@ class SearchResult {
        /**
         * Return a new SearchResult and initializes it with a row.
         *
-        * @param $row object
+        * @param object $row
         * @return SearchResult
         */
        public static function newFromRow( $row ) {
@@ -84,7 +84,7 @@ class SearchResult {
         * Initialize from a database row. Makes a Title and passes that to
         * initFromTitle.
         *
-        * @param $row object
+        * @param object $row
         */
        protected function initFromRow( $row ) {
                $this->initFromTitle( Title::makeTitle( $row->page_namespace, $row->page_title ) );
@@ -94,7 +94,7 @@ class SearchResult {
         * Initialize from a Title and if possible initializes a corresponding
         * Revision and File.
         *
-        * @param $title Title
+        * @param Title $title
         */
        protected function initFromTitle( $title ) {
                $this->mTitle = $title;
@@ -112,7 +112,7 @@ class SearchResult {
        /**
         * Check if this is result points to an invalid title
         *
-        * @return Boolean
+        * @return bool
         */
        function isBrokenTitle() {
                return is_null( $this->mTitle );
@@ -121,7 +121,7 @@ class SearchResult {
        /**
         * Check if target page is missing, happens when index is out of date
         *
-        * @return Boolean
+        * @return bool
         */
        function isMissingRevision() {
                return !$this->mRevision && !$this->mImage;
@@ -143,7 +143,7 @@ class SearchResult {
        }
 
        /**
-        * @return float|null if not supported
+        * @return float|null If not supported
         */
        function getScore() {
                return null;
@@ -164,8 +164,8 @@ class SearchResult {
        }
 
        /**
-        * @param array $terms terms to highlight
-        * @return String: highlighted text snippet, null (and not '') if not supported
+        * @param array $terms Terms to highlight
+        * @return string Highlighted text snippet, null (and not '') if not supported
         */
        function getTextSnippet( $terms ) {
                global $wgAdvancedSearchHighlighting;
@@ -182,42 +182,42 @@ class SearchResult {
        }
 
        /**
-        * @return String: highlighted title, '' if not supported
+        * @return string Highlighted title, '' if not supported
         */
        function getTitleSnippet() {
                return '';
        }
 
        /**
-        * @return String: highlighted redirect name (redirect to this page), '' if none or not supported
+        * @return string Highlighted redirect name (redirect to this page), '' if none or not supported
         */
        function getRedirectSnippet() {
                return '';
        }
 
        /**
-        * @return Title object for the redirect to this page, null if none or not supported
+        * @return Title Title object for the redirect to this page, null if none or not supported
         */
        function getRedirectTitle() {
                return null;
        }
 
        /**
-        * @return string highlighted relevant section name, null if none or not supported
+        * @return string Highlighted relevant section name, null if none or not supported
         */
        function getSectionSnippet() {
                return '';
        }
 
        /**
-        * @return Title object (pagename+fragment) for the section, null if none or not supported
+        * @return Title Title object (pagename+fragment) for the section, null if none or not supported
         */
        function getSectionTitle() {
                return null;
        }
 
        /**
-        * @return String: timestamp
+        * @return string timestamp
         */
        function getTimestamp() {
                if ( $this->mRevision ) {
@@ -229,7 +229,7 @@ class SearchResult {
        }
 
        /**
-        * @return Integer: number of words
+        * @return int Number of words
         */
        function getWordCount() {
                $this->initText();
@@ -237,7 +237,7 @@ class SearchResult {
        }
 
        /**
-        * @return Integer: size in bytes
+        * @return int Size in bytes
         */
        function getByteSize() {
                $this->initText();
@@ -245,21 +245,21 @@ class SearchResult {
        }
 
        /**
-        * @return Boolean if hit has related articles
+        * @return bool If hit has related articles
         */
        function hasRelated() {
                return false;
        }
 
        /**
-        * @return String: interwiki prefix of the title (return iw even if title is broken)
+        * @return string Interwiki prefix of the title (return iw even if title is broken)
         */
        function getInterwikiPrefix() {
                return '';
        }
 
        /**
-        * @return string interwiki namespace of the title (since we likely can't resolve it locally)
+        * @return string Interwiki namespace of the title (since we likely can't resolve it locally)
         */
        function getInterwikiNamespaceText() {
                return '';
@@ -267,6 +267,7 @@ class SearchResult {
 
        /**
         * Did this match file contents (eg: PDF/DJVU)?
+        * @return bool
         */
        function isFileMatch() {
                return false;
index e689389..178129a 100644 (file)
@@ -30,7 +30,7 @@ class SearchResultSet {
         * the search terms as parsed by this engine in a text extract.
         * STUB
         *
-        * @return Array
+        * @return array
         */
        function termMatches() {
                return array();
@@ -44,7 +44,7 @@ class SearchResultSet {
         * Return true if results are included in this result set.
         * STUB
         *
-        * @return Boolean
+        * @return bool
         */
        function hasResults() {
                return false;
@@ -58,7 +58,7 @@ class SearchResultSet {
         *
         * Return null if no total hits number is supported.
         *
-        * @return Integer
+        * @return int
         */
        function getTotalHits() {
                return null;
@@ -68,21 +68,21 @@ class SearchResultSet {
         * Some search modes return a suggested alternate term if there are
         * no exact hits. Returns true if there is one on this set.
         *
-        * @return Boolean
+        * @return bool
         */
        function hasSuggestion() {
                return false;
        }
 
        /**
-        * @return String: suggested query, null if none
+        * @return string Suggested query, null if none
         */
        function getSuggestionQuery() {
                return null;
        }
 
        /**
-        * @return String: HTML highlighted suggested query, '' if none
+        * @return string HTML highlighted suggested query, '' if none
         */
        function getSuggestionSnippet() {
                return '';
@@ -100,7 +100,7 @@ class SearchResultSet {
        /**
         * Check if there are results on other wikis
         *
-        * @return Boolean
+        * @return bool
         */
        function hasInterwikiResults() {
                return $this->getInterwikiResults() != null;
@@ -127,6 +127,7 @@ class SearchResultSet {
         * Did the search contain search syntax?  If so, Special:Search won't offer
         * the user a link to a create a page named by the search string because the
         * name would contain the search syntax.
+        * @return bool
         */
        public function searchContainedSyntax() {
                return false;
@@ -187,7 +188,7 @@ class SearchNearMatchResultSet extends SearchResultSet {
        private $fetched = false;
 
        /**
-        * @param $match mixed Title if matched, else null
+        * @param Title|null $match Title if matched, else null
         */
        public function __construct( $match ) {
                $this->result = $match;
index 6b2b3c6..1a05ee2 100644 (file)
@@ -28,7 +28,7 @@
 class SearchSqlite extends SearchDatabase {
        /**
         * Whether fulltext search is supported by current schema
-        * @return Boolean
+        * @return bool
         */
        function fulltextSearchSupported() {
                return $this->db->checkForEnabledSearch();
@@ -144,7 +144,7 @@ class SearchSqlite extends SearchDatabase {
        /**
         * Perform a full text search query and return a result set.
         *
-        * @param string $term raw search term
+        * @param string $term Raw search term
         * @return SqliteSearchResultSet
         */
        function searchText( $term ) {
@@ -154,7 +154,7 @@ class SearchSqlite extends SearchDatabase {
        /**
         * Perform a title-only search query and return a result set.
         *
-        * @param string $term raw search term
+        * @param string $term Raw search term
         * @return SqliteSearchResultSet
         */
        function searchTitle( $term ) {
@@ -186,7 +186,7 @@ class SearchSqlite extends SearchDatabase {
 
        /**
         * Return a partial WHERE clause to limit the search to the given namespaces
-        * @return String
+        * @return string
         */
        function queryNamespaces() {
                if ( is_null( $this->namespaces ) ) {
@@ -202,8 +202,8 @@ class SearchSqlite extends SearchDatabase {
 
        /**
         * Returns a query with limit for number of results set.
-        * @param $sql String:
-        * @return String
+        * @param string $sql
+        * @return string
         */
        function limitResult( $sql ) {
                return $this->db->limitResult( $sql, $this->limit, $this->offset );
@@ -212,9 +212,9 @@ class SearchSqlite extends SearchDatabase {
        /**
         * Construct the full SQL query to do the search.
         * The guts shoulds be constructed in queryMain()
-        * @param $filteredTerm String
-        * @param $fulltext Boolean
-        * @return String
+        * @param string $filteredTerm
+        * @param bool $fulltext
+        * @return string
         */
        function getQuery( $filteredTerm, $fulltext ) {
                return $this->limitResult(
@@ -225,8 +225,8 @@ class SearchSqlite extends SearchDatabase {
 
        /**
         * Picks which field to index on, depending on what type of query.
-        * @param $fulltext Boolean
-        * @return String
+        * @param bool $fulltext
+        * @return string
         */
        function getIndexField( $fulltext ) {
                return $fulltext ? 'si_text' : 'si_title';
@@ -235,9 +235,9 @@ class SearchSqlite extends SearchDatabase {
        /**
         * Get the base part of the search query.
         *
-        * @param $filteredTerm String
-        * @param $fulltext Boolean
-        * @return String
+        * @param string $filteredTerm
+        * @param bool $fulltext
+        * @return string
         */
        function queryMain( $filteredTerm, $fulltext ) {
                $match = $this->parseQuery( $filteredTerm, $fulltext );
@@ -262,9 +262,9 @@ class SearchSqlite extends SearchDatabase {
         * Create or update the search index record for the given page.
         * Title and text should be pre-processed.
         *
-        * @param $id Integer
-        * @param $title String
-        * @param $text String
+        * @param int $id
+        * @param string $title
+        * @param string $text
         */
        function update( $id, $title, $text ) {
                if ( !$this->fulltextSearchSupported() ) {
@@ -288,8 +288,8 @@ class SearchSqlite extends SearchDatabase {
         * Update a search index record's title only.
         * Title should be pre-processed.
         *
-        * @param $id Integer
-        * @param $title String
+        * @param int $id
+        * @param string $title
         */
        function updateTitle( $id, $title ) {
                if ( !$this->fulltextSearchSupported() ) {