| @@ -380,7 +380,6 @@ | ||
| 380 | 380 | |
| 381 | 381 | /** | 
| 382 | 382 | * Get the size of the diff | 
| 383 | - * @param int $rev The index of the revision within $this->pageHistory | |
| 384 | 383 | * @return int Size of the diff | 
| 385 | 384 | */ | 
| 386 | 385 | private function getDiffSize($revIndex) | 
| @@ -164,7 +164,7 @@ | ||
| 164 | 164 | private function getRevCount() | 
| 165 | 165 |      { | 
| 166 | 166 | $query = "SELECT COUNT(*) AS count FROM " . $this->revisionTable | 
| 167 | - . " WHERE rev_page = '" . $this->pageInfo['id'] . "'"; | |
| 167 | + . " WHERE rev_page = '" . $this->pageInfo['id'] . "'"; | |
| 168 | 168 | $res = $this->conn->query($query)->fetchAll(); | 
| 169 | 169 | return $res[0]['count']; | 
| 170 | 170 | } | 
| @@ -223,7 +223,7 @@ discard block | ||
| 223 | 223 | * Adds a mandatory requirement in form of a php.ini configuration. | 
| 224 | 224 | * | 
| 225 | 225 | * @param string $cfgName The configuration name used for ini_get() | 
| 226 | - * @param bool|callback $evaluation Either a boolean indicating whether the configuration should evaluate to true or false, | |
| 226 | + * @param boolean|string $evaluation Either a boolean indicating whether the configuration should evaluate to true or false, | |
| 227 | 227 | * or a callback function receiving the configuration value as parameter to determine the fulfillment of the requirement | 
| 228 | 228 | * @param bool $approveCfgAbsence If true the Requirement will be fulfilled even if the configuration option does not exist, i.e. ini_get() returns false. | 
| 229 | 229 | * This is helpful for abandoned configs in later PHP versions or configs of an optional extension, like Suhosin. | 
| @@ -241,7 +241,7 @@ discard block | ||
| 241 | 241 | * Adds an optional recommendation in form of a php.ini configuration. | 
| 242 | 242 | * | 
| 243 | 243 | * @param string $cfgName The configuration name used for ini_get() | 
| 244 | - * @param bool|callback $evaluation Either a boolean indicating whether the configuration should evaluate to true or false, | |
| 244 | + * @param string|false $evaluation Either a boolean indicating whether the configuration should evaluate to true or false, | |
| 245 | 245 | * or a callback function receiving the configuration value as parameter to determine the fulfillment of the requirement | 
| 246 | 246 | * @param bool $approveCfgAbsence If true the Requirement will be fulfilled even if the configuration option does not exist, i.e. ini_get() returns false. | 
| 247 | 247 | * This is helpful for abandoned configs in later PHP versions or configs of an optional extension, like Suhosin. | 
| @@ -146,7 +146,7 @@ | ||
| 146 | 146 | |
| 147 | 147 | /** | 
| 148 | 148 | * | 
| 149 | - * @param $username | |
| 149 | + * @param string $username | |
| 150 | 150 | * @return integer | 
| 151 | 151 | */ | 
| 152 | 152 | public function getPageCounts($username, $totalRevisions) | 
| @@ -125,7 +125,7 @@ | ||
| 125 | 125 | /** @var LabsHelper $labsHelper */ | 
| 126 | 126 |          $labsHelper = $this->container->get('app.labs_helper'); | 
| 127 | 127 |          $sql = "SELECT rev_comment FROM ".$labsHelper->getTable('revision') | 
| 128 | - ." WHERE rev_user=:userId ORDER BY rev_timestamp DESC LIMIT 1000"; | |
| 128 | + ." WHERE rev_user=:userId ORDER BY rev_timestamp DESC LIMIT 1000"; | |
| 129 | 129 | $resultQuery = $replicas->prepare($sql); | 
| 130 | 130 |          $resultQuery->bindParam("userId", $userId); | 
| 131 | 131 | $resultQuery->execute(); | 
| @@ -72,7 +72,6 @@ discard block | ||
| 72 | 72 | |
| 73 | 73 | /** | 
| 74 | 74 | * Get a link to the given user's userpage, or to Special:Contribs if $username is an IP | 
| 75 | - * @param string $username Username | |
| 76 | 75 | * @param string $projectUrl Project domain and protocol such as https://en.wikipedia.org | 
| 77 | 76 | * @param string [$label] The link text, defaults to $username | 
| 78 | 77 | * @return string Markup | 
| @@ -176,7 +175,7 @@ discard block | ||
| 176 | 175 | /** | 
| 177 | 176 | * Get links to pageviews tools for the given page | 
| 178 | 177 | * @param string $title Title of page | 
| 179 | - * @param string $projectUrl Project domain such as en.wikipedia.org | |
| 178 | + * @param string $project Project domain such as en.wikipedia.org | |
| 180 | 179 | * @return string Markup | 
| 181 | 180 | */ | 
| 182 | 181 | public function pageviewsLinks($title, $project) | 
| @@ -138,6 +138,9 @@ discard block | ||
| 138 | 138 | return $result; | 
| 139 | 139 | } | 
| 140 | 140 | |
| 141 | + /** | |
| 142 | + * @param string $username | |
| 143 | + */ | |
| 141 | 144 | public function groups($project, $username) | 
| 142 | 145 |      { | 
| 143 | 146 | $this->setUp($project); | 
| @@ -157,6 +160,9 @@ discard block | ||
| 157 | 160 | return $result; | 
| 158 | 161 | } | 
| 159 | 162 | |
| 163 | + /** | |
| 164 | + * @param string $username | |
| 165 | + */ | |
| 160 | 166 | public function globalGroups($project, $username) | 
| 161 | 167 |      { | 
| 162 | 168 | $this->setUp($project); | 
| @@ -180,7 +186,7 @@ discard block | ||
| 180 | 186 | * Get a list of namespaces on the given project. | 
| 181 | 187 | * | 
| 182 | 188 | * @param string $project such as en.wikipedia.org | 
| 183 | - * @return string[] Array of namespace IDs (keys) to names (values). | |
| 189 | + * @return string Array of namespace IDs (keys) to names (values). | |
| 184 | 190 | */ | 
| 185 | 191 | public function namespaces($project) | 
| 186 | 192 |      { | 
| @@ -61,6 +61,6 @@ | ||
| 61 | 61 | public function userRightsUrl(Project $project) | 
| 62 | 62 |      { | 
| 63 | 63 | return $project->getUrl() . $project->getScriptPath() . "?title=Special:UserRights&user=" . | 
| 64 | - $this->getUsername(); | |
| 64 | + $this->getUsername(); | |
| 65 | 65 | } | 
| 66 | 66 | } | 
| @@ -111,7 +111,7 @@ | ||
| 111 | 111 | * List top edits by this user for all pages in a particular namespace. | 
| 112 | 112 | * @param User $user The User. | 
| 113 | 113 | * @param Project $project The project. | 
| 114 | - * @param integer|string $namespace The namespace ID or 'all' | |
| 114 | + * @param integer $namespace The namespace ID or 'all' | |
| 115 | 115 | * @return \Symfony\Component\HttpFoundation\Response | 
| 116 | 116 | */ | 
| 117 | 117 | protected function namespaceTopEdits(User $user, Project $project, $namespace) | 
| @@ -14,6 +14,9 @@ | ||
| 14 | 14 | /** @var string[] Basic metadata about the project */ | 
| 15 | 15 | protected $metadata; | 
| 16 | 16 | |
| 17 | + /** | |
| 18 | + * @param string $nameOrUrl | |
| 19 | + */ | |
| 17 | 20 | public function __construct($nameOrUrl) | 
| 18 | 21 |      { | 
| 19 | 22 | $this->nameUnnormalized = $nameOrUrl; |