@@ -4,7 +4,6 @@ |
||
4 | 4 | |
5 | 5 | use Symfony\Bundle\FrameworkBundle\Controller\Controller; |
6 | 6 | use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route; |
7 | -use Symfony\Component\Debug\Exception\ContextErrorException; |
|
8 | 7 | use Symfony\Component\Routing\Exception\InvalidParameterException; |
9 | 8 | use Symfony\Component\HttpFoundation\Request; |
10 | 9 |
@@ -14,6 +14,9 @@ |
||
14 | 14 | /** @var string[] Basic metadata about the project */ |
15 | 15 | protected $metadata; |
16 | 16 | |
17 | + /** |
|
18 | + * @param string $nameOrUrl |
|
19 | + */ |
|
17 | 20 | public function __construct($nameOrUrl) |
18 | 21 | { |
19 | 22 | $this->nameUnnormalized = $nameOrUrl; |
@@ -3,7 +3,6 @@ |
||
3 | 3 | namespace Xtools; |
4 | 4 | |
5 | 5 | use Mediawiki\Api\MediawikiApi; |
6 | -use Symfony\Component\VarDumper\VarDumper; |
|
7 | 6 | |
8 | 7 | /** |
9 | 8 | * A Project is a single wiki that Xtools is querying. |
@@ -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 | { |
@@ -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) |
@@ -7,7 +7,6 @@ |
||
7 | 7 | use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route; |
8 | 8 | use Symfony\Bundle\FrameworkBundle\Controller\Controller; |
9 | 9 | use Symfony\Component\HttpFoundation\Request; |
10 | -use Symfony\Component\VarDumper\VarDumper; |
|
11 | 10 | use Xtools\Page; |
12 | 11 | use Xtools\PagesRepository; |
13 | 12 | use Xtools\Project; |
@@ -3,7 +3,6 @@ |
||
3 | 3 | namespace Xtools; |
4 | 4 | |
5 | 5 | use Xtools\User; |
6 | -use AppBundle\Helper\AutomatedEditsHelper; |
|
7 | 6 | use DateTime; |
8 | 7 | |
9 | 8 | /** |
@@ -80,7 +80,6 @@ discard block |
||
80 | 80 | |
81 | 81 | /** |
82 | 82 | * Link to list of users who are in the given user group |
83 | - * @param string $username Username |
|
84 | 83 | * @param string $projectUrl Project domain and protocol such as https://en.wikipedia.org |
85 | 84 | * @param string [$label] The link text, defaults to $username |
86 | 85 | * @return string Markup |
@@ -230,7 +229,7 @@ discard block |
||
230 | 229 | /** |
231 | 230 | * Get links to pageviews tools for the given page |
232 | 231 | * @param string $title Title of page |
233 | - * @param string $projectUrl Project domain such as en.wikipedia.org |
|
232 | + * @param string $project Project domain such as en.wikipedia.org |
|
234 | 233 | * @return string Markup |
235 | 234 | */ |
236 | 235 | public function pageviewsLinks($title, $project) |
@@ -2,13 +2,8 @@ |
||
2 | 2 | |
3 | 3 | namespace AppBundle\Controller; |
4 | 4 | |
5 | -use AppBundle\Helper\AutomatedEditsHelper; |
|
6 | -use Exception; |
|
7 | -use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route; |
|
8 | 5 | use Symfony\Bundle\FrameworkBundle\Controller\Controller; |
9 | -use Symfony\Component\HttpFoundation\Request; |
|
10 | 6 | use Symfony\Component\HttpFoundation\Response; |
11 | -use Symfony\Component\Debug\Exception\FatalErrorException; |
|
12 | 7 | use FOS\RestBundle\Controller\Annotations as Rest; |
13 | 8 | use FOS\RestBundle\Controller\FOSRestController; |
14 | 9 | use FOS\RestBundle\View\View; |
@@ -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; |
@@ -28,7 +28,6 @@ |
||
28 | 28 | * @Route("/scottywong tools/adminscore.php", name="AdminScoreLegacy") |
29 | 29 | * @Route("/adminscore/{project}", name="AdminScoreProject") |
30 | 30 | * @param Request $request The HTTP request. |
31 | - * @param string $project The project name. |
|
32 | 31 | * @return Response |
33 | 32 | */ |
34 | 33 | public function indexAction(Request $request) |
@@ -11,7 +11,6 @@ |
||
11 | 11 | use Symfony\Component\HttpFoundation\RedirectResponse; |
12 | 12 | use Symfony\Component\HttpFoundation\Request; |
13 | 13 | use Symfony\Component\HttpFoundation\Response; |
14 | -use Symfony\Component\HttpKernel\Exception\NotFoundHttpException; |
|
15 | 14 | use Xtools\ProjectRepository; |
16 | 15 | |
17 | 16 | /** |