@@ -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 | { |
@@ -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 | /** |
@@ -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 | * @codeCoverageIgnore |
| 93 | 93 | */ |
| 94 | 94 | public function resultAction($project, $username) |
@@ -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; |
@@ -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 | { |
@@ -420,8 +420,8 @@ discard block |
||
| 420 | 420 | |
| 421 | 421 | /** |
| 422 | 422 | * Get the sum of pageviews for the given page and timeframe. |
| 423 | - * @param string|DateTime $start In the format YYYYMMDD |
|
| 424 | - * @param string|DateTime $end In the format YYYYMMDD |
|
| 423 | + * @param string $start In the format YYYYMMDD |
|
| 424 | + * @param string $end In the format YYYYMMDD |
|
| 425 | 425 | * @return string[] |
| 426 | 426 | */ |
| 427 | 427 | public function getPageviews($start, $end) |
@@ -8,7 +8,6 @@ |
||
| 8 | 8 | use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route; |
| 9 | 9 | use Symfony\Bundle\FrameworkBundle\Controller\Controller; |
| 10 | 10 | use Symfony\Component\HttpFoundation\Request; |
| 11 | -use Symfony\Component\HttpKernel\Exception\NotFoundHttpException; |
|
| 12 | 11 | use Xtools\ProjectRepository; |
| 13 | 12 | use Xtools\Page; |
| 14 | 13 | use Xtools\PagesRepository; |
@@ -45,7 +45,7 @@ discard block |
||
| 45 | 45 | * @Route("/rfx/{project}", name="rfxAnalysisProject") |
| 46 | 46 | * @Route("/rfx/{project}/{type}", name="rfxAnalysisProjectType") |
| 47 | 47 | * |
| 48 | - * @return Response|RedirectResponse |
|
| 48 | + * @return \Symfony\Component\HttpFoundation\Response |
|
| 49 | 49 | */ |
| 50 | 50 | public function indexAction(Request $request, $project = null, $type = null) |
| 51 | 51 | { |
@@ -111,7 +111,7 @@ discard block |
||
| 111 | 111 | * |
| 112 | 112 | * @Route("/rfx/{project}/{type}/{username}", name="rfxAnalysisResult") |
| 113 | 113 | * |
| 114 | - * @return Response|RedirectResponse |
|
| 114 | + * @return \Symfony\Component\HttpFoundation\Response |
|
| 115 | 115 | * @codeCoverageIgnore |
| 116 | 116 | */ |
| 117 | 117 | public function resultAction($project, $type, $username) |
@@ -35,7 +35,7 @@ |
||
| 35 | 35 | * Returns matches. |
| 36 | 36 | * |
| 37 | 37 | * @param string $input The line we're looking for |
| 38 | - * @param array $matches Pointer to an array where we stash results |
|
| 38 | + * @param string[] $matches Pointer to an array where we stash results |
|
| 39 | 39 | * |
| 40 | 40 | * @TODO: Make this cleaner |
| 41 | 41 | * |
@@ -96,7 +96,7 @@ discard block |
||
| 96 | 96 | * Get the user's (system) edit count. |
| 97 | 97 | * @param string $databaseName The database to query. |
| 98 | 98 | * @param string $username The username to find. |
| 99 | - * @return int|null As returned by the database. |
|
| 99 | + * @return string|boolean As returned by the database. |
|
| 100 | 100 | */ |
| 101 | 101 | public function getEditCount($databaseName, $username) |
| 102 | 102 | { |
@@ -741,7 +741,7 @@ discard block |
||
| 741 | 741 | * Get the combined regex and tags for all semi-automated tools, |
| 742 | 742 | * ready to be used in a query. |
| 743 | 743 | * @param string $projectDomain Such as en.wikipedia.org |
| 744 | - * @param $conn Doctrine\DBAL\Connection Used for proper escaping |
|
| 744 | + * @param \Doctrine\DBAL\Connection $conn Doctrine\DBAL\Connection Used for proper escaping |
|
| 745 | 745 | * @return string[] In the format: |
| 746 | 746 | * ['combined|regex', 'combined,tags'] |
| 747 | 747 | */ |