@@ -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; |
@@ -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. |
@@ -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; |
@@ -102,7 +102,7 @@ |
||
| 102 | 102 | * |
| 103 | 103 | * @param string $project The project domain name. |
| 104 | 104 | * @param string $username The username. |
| 105 | - * @param string $namespace Namespace ID or 'all' for all namespaces. |
|
| 105 | + * @param integer $namespace Namespace ID or 'all' for all namespaces. |
|
| 106 | 106 | * |
| 107 | 107 | * @Route("/editsummary/{project}/{username}/{namespace}", name="EditSummaryResult") |
| 108 | 108 | * |
@@ -3,8 +3,6 @@ |
||
| 3 | 3 | namespace AppBundle\Controller; |
| 4 | 4 | |
| 5 | 5 | use Symfony\Bundle\FrameworkBundle\Controller\Controller; |
| 6 | -use Symfony\Component\CssSelector\Exception\InternalErrorException; |
|
| 7 | -use Symfony\Component\Debug\Exception\ContextErrorException; |
|
| 8 | 6 | use Symfony\Component\HttpFoundation\Request; |
| 9 | 7 | use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route; |
| 10 | 8 | use Xtools\ProjectRepository; |
@@ -39,7 +39,7 @@ discard block |
||
| 39 | 39 | * @Route("/rfxvote/index.php", name="rfxvoteIndexPhp") |
| 40 | 40 | * @Route("/rfxvote", name="RfXVoteCalculator") |
| 41 | 41 | * |
| 42 | - * @return Response |
|
| 42 | + * @return \Symfony\Component\HttpFoundation\Response |
|
| 43 | 43 | */ |
| 44 | 44 | public function indexAction() |
| 45 | 45 | { |
@@ -88,7 +88,7 @@ discard block |
||
| 88 | 88 | * |
| 89 | 89 | * @Route("/rfxvote/{project}/{username}", name="rfxvoteResult") |
| 90 | 90 | * |
| 91 | - * @return Response |
|
| 91 | + * @return \Symfony\Component\HttpFoundation\Response |
|
| 92 | 92 | */ |
| 93 | 93 | public function resultAction($project, $username) |
| 94 | 94 | { |
@@ -473,7 +473,7 @@ discard block |
||
| 473 | 473 | |
| 474 | 474 | /** |
| 475 | 475 | * Get the date and time of the user's first edit. |
| 476 | - * @return DateTime|bool The time of the first revision, or false. |
|
| 476 | + * @return DateInterval The time of the first revision, or false. |
|
| 477 | 477 | */ |
| 478 | 478 | public function datetimeFirstRevision() |
| 479 | 479 | { |
@@ -483,7 +483,7 @@ discard block |
||
| 483 | 483 | |
| 484 | 484 | /** |
| 485 | 485 | * Get the date and time of the user's first edit. |
| 486 | - * @return DateTime|bool The time of the last revision, or false. |
|
| 486 | + * @return DateInterval The time of the last revision, or false. |
|
| 487 | 487 | */ |
| 488 | 488 | public function datetimeLastRevision() |
| 489 | 489 | { |
@@ -6,7 +6,6 @@ |
||
| 6 | 6 | namespace Xtools; |
| 7 | 7 | |
| 8 | 8 | use DateTime; |
| 9 | -use Exception; |
|
| 10 | 9 | use DatePeriod; |
| 11 | 10 | use DateInterval; |
| 12 | 11 | use GuzzleHttp; |
@@ -5,12 +5,9 @@ |
||
| 5 | 5 | |
| 6 | 6 | namespace AppBundle\Controller; |
| 7 | 7 | |
| 8 | -use Exception; |
|
| 9 | -use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route; |
|
| 10 | 8 | use Symfony\Bundle\FrameworkBundle\Controller\Controller; |
| 11 | 9 | use Symfony\Component\HttpFoundation\Request; |
| 12 | 10 | use Symfony\Component\HttpFoundation\Response; |
| 13 | -use Symfony\Component\Debug\Exception\FatalErrorException; |
|
| 14 | 11 | use FOS\RestBundle\Controller\Annotations as Rest; |
| 15 | 12 | use FOS\RestBundle\Controller\FOSRestController; |
| 16 | 13 | use FOS\RestBundle\View\View; |