Merge "fixed php doc in ApiBase"
[lhc/web/wiklou.git] / includes / api / ApiBase.php
index d2d50ae..f386a8a 100644 (file)
@@ -445,7 +445,7 @@ abstract class ApiBase extends ContextSource {
                                                                $hintPipeSeparated = false;
                                                                break;
                                                        case 'limit':
-                                                               $desc .= $paramPrefix . "No more than {$paramSettings[self :: PARAM_MAX]}";
+                                                               $desc .= $paramPrefix . "No more than {$paramSettings[self::PARAM_MAX]}";
                                                                if ( isset( $paramSettings[self::PARAM_MAX2] ) ) {
                                                                        $desc .= " ({$paramSettings[self::PARAM_MAX2]} for bots)";
                                                                }
@@ -1081,7 +1081,7 @@ abstract class ApiBase extends ContextSource {
 
                if ( !$allowMultiple && count( $valuesList ) != 1 ) {
                        // Bug 33482 - Allow entries with | in them for non-multiple values
-                       if ( in_array( $value, $allowedValues ) ) {
+                       if ( in_array( $value, $allowedValues, true ) ) {
                                return $value;
                        }
 
@@ -1165,7 +1165,7 @@ abstract class ApiBase extends ContextSource {
        /**
         * Validate and normalize of parameters of type 'user'
         * @param string $value Parameter value
-        * @param string $encParamName Parameter value
+        * @param string $encParamName Parameter name
         * @return string Validated and normalized parameter
         */
        private function validateUser( $value, $encParamName ) {
@@ -1535,7 +1535,7 @@ abstract class ApiBase extends ContextSource {
        public function getWatchlistUser( $params ) {
                if ( !is_null( $params['owner'] ) && !is_null( $params['token'] ) ) {
                        $user = User::newFromName( $params['owner'], false );
-                       if ( !($user && $user->getId()) ) {
+                       if ( !( $user && $user->getId() ) ) {
                                $this->dieUsage( 'Specified user does not exist', 'bad_wlowner' );
                        }
                        $token = $user->getOption( 'watchlisttoken' );