@@ -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 | } |
@@ -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) |
@@ -177,7 +177,7 @@ |
||
| 177 | 177 | * Get a list of namespaces on the given project. |
| 178 | 178 | * |
| 179 | 179 | * @param string $project such as en.wikipedia.org |
| 180 | - * @return string[] Array of namespace IDs (keys) to names (values). |
|
| 180 | + * @return string Array of namespace IDs (keys) to names (values). |
|
| 181 | 181 | */ |
| 182 | 182 | public function namespaces($project) |
| 183 | 183 | { |
@@ -66,7 +66,7 @@ |
||
| 66 | 66 | public function userRightsUrl(Project $project) |
| 67 | 67 | { |
| 68 | 68 | return $project->getUrl() . $project->getScriptPath() . "?title=Special:UserRights&user=" . |
| 69 | - $this->getUsername(); |
|
| 69 | + $this->getUsername(); |
|
| 70 | 70 | } |
| 71 | 71 | |
| 72 | 72 | /** |
@@ -96,7 +96,7 @@ |
||
| 96 | 96 | * List top edits by this user for all pages in a particular namespace. |
| 97 | 97 | * @param User $user The User. |
| 98 | 98 | * @param Project $project The project. |
| 99 | - * @param integer|string $namespaceId The namespace ID or 'all' |
|
| 99 | + * @param integer $namespaceId The namespace ID or 'all' |
|
| 100 | 100 | * @return \Symfony\Component\HttpFoundation\Response |
| 101 | 101 | */ |
| 102 | 102 | protected function namespaceTopEdits(User $user, Project $project, $namespaceId) |
@@ -251,7 +251,6 @@ discard block |
||
| 251 | 251 | * Get a user's total edit count on one or more project. |
| 252 | 252 | * Requires the CentralAuth extension to be installed on the project. |
| 253 | 253 | * |
| 254 | - * @param string $username The username. |
|
| 255 | 254 | * @param Project $project The project to start from. |
| 256 | 255 | * @return mixed[]|boolean Array of total edit counts, or false if none could be found. |
| 257 | 256 | */ |
@@ -301,7 +300,7 @@ discard block |
||
| 301 | 300 | |
| 302 | 301 | /** |
| 303 | 302 | * Get total edit counts for the top 10 projects for this user. |
| 304 | - * @param string $username The username. |
|
| 303 | + * @param string $stopwatchName |
|
| 305 | 304 | * @return string[] Elements are arrays with 'dbName', 'url', 'name', and 'total'. |
| 306 | 305 | */ |
| 307 | 306 | protected function getRevisionCountsAllProjectsNoCentralAuth( |
@@ -413,7 +412,6 @@ discard block |
||
| 413 | 412 | |
| 414 | 413 | /** |
| 415 | 414 | * Get data for a bar chart of monthly edit totals per namespace. |
| 416 | - * @param string $username The username. |
|
| 417 | 415 | * @return string[] |
| 418 | 416 | */ |
| 419 | 417 | public function getMonthCounts(Project $project, User $user) |
@@ -251,9 +251,9 @@ |
||
| 251 | 251 | $conn = $this->getProjectsConnection(); |
| 252 | 252 | $pageTable = $this->getTableName($project->getDatabaseName(), 'page'); |
| 253 | 253 | $query = "SELECT page_id " |
| 254 | - . " FROM $pageTable " |
|
| 255 | - . " WHERE page_namespace = :ns AND page_title = :title AND page_len > 0 " |
|
| 256 | - . " LIMIT 1"; |
|
| 254 | + . " FROM $pageTable " |
|
| 255 | + . " WHERE page_namespace = :ns AND page_title = :title AND page_len > 0 " |
|
| 256 | + . " LIMIT 1"; |
|
| 257 | 257 | $params = [ |
| 258 | 258 | 'ns' => $namespaceId, |
| 259 | 259 | 'title' => $pageTitle, |
@@ -55,7 +55,7 @@ discard block |
||
| 55 | 55 | |
| 56 | 56 | /** |
| 57 | 57 | * Get this page's database ID. |
| 58 | - * @return int |
|
| 58 | + * @return \string|null |
|
| 59 | 59 | */ |
| 60 | 60 | public function getId() |
| 61 | 61 | { |
@@ -65,7 +65,7 @@ discard block |
||
| 65 | 65 | |
| 66 | 66 | /** |
| 67 | 67 | * Get this page's length in bytes. |
| 68 | - * @return int |
|
| 68 | + * @return \string|null |
|
| 69 | 69 | */ |
| 70 | 70 | public function getLength() |
| 71 | 71 | { |
@@ -88,7 +88,7 @@ discard block |
||
| 88 | 88 | } |
| 89 | 89 | |
| 90 | 90 | /** |
| 91 | - * @return string |
|
| 91 | + * @return \string|null |
|
| 92 | 92 | */ |
| 93 | 93 | public function getUrl() |
| 94 | 94 | { |
@@ -15,7 +15,7 @@ discard block |
||
| 15 | 15 | * @param Project $project The project to which the page belongs. |
| 16 | 16 | * @param string $pageTitle Page title. |
| 17 | 17 | * @param boolean $followRedirects Whether or not to resolve redirects |
| 18 | - * @return string[] Array with some of the following keys: pageid, title, missing, displaytitle, |
|
| 18 | + * @return string|null Array with some of the following keys: pageid, title, missing, displaytitle, |
|
| 19 | 19 | * url. |
| 20 | 20 | */ |
| 21 | 21 | public function getPageInfo(Project $project, $pageTitle, $followRedirects = true) |
@@ -63,7 +63,6 @@ discard block |
||
| 63 | 63 | |
| 64 | 64 | /** |
| 65 | 65 | * Get revisions of a single page. |
| 66 | - * @param Project $project |
|
| 67 | 66 | * @param Page $page |
| 68 | 67 | * @param User|null $user Specify to get only revisions by the given user. |
| 69 | 68 | * @return string[] Each member with keys: id, timestamp, length- |
@@ -96,7 +95,6 @@ discard block |
||
| 96 | 95 | |
| 97 | 96 | /** |
| 98 | 97 | * Get a count of the number of revisions of a single page |
| 99 | - * @param Project $project |
|
| 100 | 98 | * @param Page $page |
| 101 | 99 | * @param User|null $user Specify to only count revisions by the given user. |
| 102 | 100 | * @return int |