@@ -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) |
@@ -9,7 +9,6 @@ |
||
9 | 9 | use Symfony\Bundle\FrameworkBundle\Controller\Controller; |
10 | 10 | use Symfony\Component\HttpFoundation\Request; |
11 | 11 | use Symfony\Component\HttpFoundation\Response; |
12 | -use Symfony\Component\HttpKernel\Exception\NotFoundHttpException; |
|
13 | 12 | use DateTime; |
14 | 13 | use Xtools\ProjectRepository; |
15 | 14 | use Xtools\UserRepository; |
@@ -12,7 +12,6 @@ |
||
12 | 12 | use Symfony\Component\HttpFoundation\Response; |
13 | 13 | use Xtools\EditCounter; |
14 | 14 | use Xtools\EditCounterRepository; |
15 | -use Xtools\Page; |
|
16 | 15 | use Xtools\Project; |
17 | 16 | use Xtools\ProjectRepository; |
18 | 17 | use Xtools\User; |
@@ -6,7 +6,6 @@ |
||
6 | 6 | namespace Xtools; |
7 | 7 | |
8 | 8 | use Mediawiki\Api\MediawikiApi; |
9 | -use Symfony\Component\VarDumper\VarDumper; |
|
10 | 9 | |
11 | 10 | /** |
12 | 11 | * A Project is a single wiki that XTools is querying. |
@@ -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 | { |
@@ -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. |
@@ -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 | { |
@@ -11,7 +11,6 @@ |
||
11 | 11 | use Symfony\Component\HttpFoundation\Request; |
12 | 12 | use Symfony\Component\HttpFoundation\Response; |
13 | 13 | use Xtools\ProjectRepository; |
14 | -use Xtools\User; |
|
15 | 14 | use Xtools\UserRepository; |
16 | 15 | |
17 | 16 | /** |
@@ -6,7 +6,6 @@ |
||
6 | 6 | namespace Xtools; |
7 | 7 | |
8 | 8 | use DateInterval; |
9 | -use DateTime; |
|
10 | 9 | use Mediawiki\Api\SimpleRequest; |
11 | 10 | |
12 | 11 | /** |
@@ -10,7 +10,6 @@ |
||
10 | 10 | use Symfony\Bundle\FrameworkBundle\Controller\Controller; |
11 | 11 | use Symfony\Component\HttpFoundation\Request; |
12 | 12 | use Symfony\Component\HttpFoundation\Response; |
13 | -use Psr\Cache\CacheItemPoolInterface; |
|
14 | 13 | use Xtools\Project; |
15 | 14 | use Xtools\ProjectRepository; |
16 | 15 | use Xtools\User; |