@@ -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) |
@@ -24,7 +24,7 @@ discard block |
||
| 24 | 24 | |
| 25 | 25 | /** |
| 26 | 26 | * Get all functions that this class provides. |
| 27 | - * @return array |
|
| 27 | + * @return \Twig_SimpleFunction[] |
|
| 28 | 28 | */ |
| 29 | 29 | public function getFunctions() |
| 30 | 30 | { |
@@ -520,7 +520,7 @@ discard block |
||
| 520 | 520 | |
| 521 | 521 | /** |
| 522 | 522 | * Get all filters for this extension. |
| 523 | - * @return array |
|
| 523 | + * @return \Twig_SimpleFilter[] |
|
| 524 | 524 | */ |
| 525 | 525 | public function getFilters() |
| 526 | 526 | { |
@@ -49,7 +49,7 @@ |
||
| 49 | 49 | |
| 50 | 50 | /** |
| 51 | 51 | * Get all functions provided by this extension. |
| 52 | - * @return array |
|
| 52 | + * @return \Twig_SimpleFilter[] |
|
| 53 | 53 | */ |
| 54 | 54 | public function getFilters() |
| 55 | 55 | { |
@@ -255,7 +255,7 @@ |
||
| 255 | 255 | * Adapted from https://github.com/MusikAnimal/pageviews |
| 256 | 256 | * @param array $params Associative array of params to pass to API |
| 257 | 257 | * @param string $project Project to query, e.g. en.wikipedia.org |
| 258 | - * @param string|func $dataKey The key for the main chunk of data, in the query hash |
|
| 258 | + * @param string $dataKey The key for the main chunk of data, in the query hash |
|
| 259 | 259 | * (e.g. 'categorymembers' for API:Categorymembers). |
| 260 | 260 | * If this is a function it is given the response data, |
| 261 | 261 | * and expected to return the data we want to concatentate. |
@@ -200,7 +200,7 @@ |
||
| 200 | 200 | /** |
| 201 | 201 | * Get an array of this project's namespaces and their IDs. |
| 202 | 202 | * |
| 203 | - * @return string[] Keys are IDs, values are names. |
|
| 203 | + * @return string Keys are IDs, values are names. |
|
| 204 | 204 | */ |
| 205 | 205 | public function getNamespaces() |
| 206 | 206 | { |
@@ -59,7 +59,7 @@ discard block |
||
| 59 | 59 | |
| 60 | 60 | /** |
| 61 | 61 | * Get this page's database ID. |
| 62 | - * @return int |
|
| 62 | + * @return \string|null |
|
| 63 | 63 | */ |
| 64 | 64 | public function getId() |
| 65 | 65 | { |
@@ -69,7 +69,7 @@ discard block |
||
| 69 | 69 | |
| 70 | 70 | /** |
| 71 | 71 | * Get this page's length in bytes. |
| 72 | - * @return int |
|
| 72 | + * @return \string|null |
|
| 73 | 73 | */ |
| 74 | 74 | public function getLength() |
| 75 | 75 | { |
@@ -93,7 +93,7 @@ discard block |
||
| 93 | 93 | |
| 94 | 94 | /** |
| 95 | 95 | * Get the full URL of this page. |
| 96 | - * @return string |
|
| 96 | + * @return \string|null |
|
| 97 | 97 | */ |
| 98 | 98 | public function getUrl() |
| 99 | 99 | { |
@@ -103,7 +103,7 @@ discard block |
||
| 103 | 103 | |
| 104 | 104 | /** |
| 105 | 105 | * Get the numerical ID of the namespace of this page. |
| 106 | - * @return int |
|
| 106 | + * @return \string|null |
|
| 107 | 107 | */ |
| 108 | 108 | public function getNamespace() |
| 109 | 109 | { |
@@ -113,7 +113,7 @@ discard block |
||
| 113 | 113 | |
| 114 | 114 | /** |
| 115 | 115 | * Get the number of page watchers. |
| 116 | - * @return int |
|
| 116 | + * @return \string|null |
|
| 117 | 117 | */ |
| 118 | 118 | public function getWatchers() |
| 119 | 119 | { |
@@ -378,7 +378,6 @@ discard block |
||
| 378 | 378 | |
| 379 | 379 | /** |
| 380 | 380 | * Get all wikidata items for the page, not just languages of sister projects |
| 381 | - * @param Page $page |
|
| 382 | 381 | * @return int Number of records. |
| 383 | 382 | */ |
| 384 | 383 | public function getWikidataItems() |
@@ -388,7 +387,6 @@ discard block |
||
| 388 | 387 | |
| 389 | 388 | /** |
| 390 | 389 | * Count wikidata items for the page, not just languages of sister projects |
| 391 | - * @param Page $page |
|
| 392 | 390 | * @return int Number of records. |
| 393 | 391 | */ |
| 394 | 392 | public function countWikidataItems() |
@@ -18,7 +18,7 @@ discard block |
||
| 18 | 18 | * Get metadata about a single page from the API. |
| 19 | 19 | * @param Project $project The project to which the page belongs. |
| 20 | 20 | * @param string $pageTitle Page title. |
| 21 | - * @return string[] Array with some of the following keys: pageid, title, missing, displaytitle, |
|
| 21 | + * @return string|null Array with some of the following keys: pageid, title, missing, displaytitle, |
|
| 22 | 22 | * url. |
| 23 | 23 | */ |
| 24 | 24 | public function getPageInfo(Project $project, $pageTitle) |
@@ -96,7 +96,7 @@ discard block |
||
| 96 | 96 | * Get the statement for a single revision, so that you can iterate row by row. |
| 97 | 97 | * @param Page $page The page. |
| 98 | 98 | * @param User|null $user Specify to get only revisions by the given user. |
| 99 | - * @return Doctrine\DBAL\Driver\PDOStatement |
|
| 99 | + * @return \Doctrine\DBAL\Driver\Statement |
|
| 100 | 100 | */ |
| 101 | 101 | public function getRevisionsStmt(Page $page, User $user = null) |
| 102 | 102 | { |
@@ -695,7 +695,7 @@ |
||
| 695 | 695 | * Get the combined regex and tags for all semi-automated tools, |
| 696 | 696 | * ready to be used in a query. |
| 697 | 697 | * @param string $projectDomain Such as en.wikipedia.org |
| 698 | - * @param $conn Doctrine\DBAL\Connection Used for proper escaping |
|
| 698 | + * @param \Doctrine\DBAL\Connection $conn Doctrine\DBAL\Connection Used for proper escaping |
|
| 699 | 699 | * @return string[] In the format: |
| 700 | 700 | * ['combined|regex', 'combined,tags'] |
| 701 | 701 | */ |
@@ -20,7 +20,7 @@ discard block |
||
| 20 | 20 | * Returns matches. |
| 21 | 21 | * |
| 22 | 22 | * @param $input |
| 23 | - * @param $matches |
|
| 23 | + * @param string[] $matches |
|
| 24 | 24 | * |
| 25 | 25 | * @return int |
| 26 | 26 | */ |
@@ -85,6 +85,9 @@ discard block |
||
| 85 | 85 | return $this->userSectionFound; |
| 86 | 86 | } |
| 87 | 87 | |
| 88 | + /** |
|
| 89 | + * @param string $sectionName |
|
| 90 | + */ |
|
| 88 | 91 | public function getSection($sectionName) { |
| 89 | 92 | $sectionName = strtolower($sectionName); |
| 90 | 93 | if (!isset($this->data[$sectionName])) { |