@@ -5,7 +5,6 @@ |
||
| 5 | 5 | use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route; |
| 6 | 6 | use Symfony\Bundle\FrameworkBundle\Controller\Controller; |
| 7 | 7 | use Symfony\Component\HttpFoundation\Request; |
| 8 | -use Symfony\Component\HttpKernel\Exception\NotFoundHttpException; |
|
| 9 | 8 | use DateTime; |
| 10 | 9 | use Xtools\ProjectRepository; |
| 11 | 10 | |
@@ -6,11 +6,7 @@ |
||
| 6 | 6 | use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route; |
| 7 | 7 | use Symfony\Bundle\FrameworkBundle\Controller\Controller; |
| 8 | 8 | use Symfony\Component\HttpFoundation\Request; |
| 9 | -use Symfony\Component\HttpKernel\Exception\NotFoundHttpException; |
|
| 10 | 9 | use Symfony\Component\DependencyInjection\ContainerInterface; |
| 11 | -use AppBundle\Helper\Apihelper; |
|
| 12 | -use AppBundle\Helper\PageviewsHelper; |
|
| 13 | -use AppBundle\Helper\AutomatedEditsHelper; |
|
| 14 | 10 | use Xtools\ProjectRepository; |
| 15 | 11 | |
| 16 | 12 | class ArticleInfoController extends Controller |
@@ -5,7 +5,6 @@ |
||
| 5 | 5 | use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route; |
| 6 | 6 | use Symfony\Bundle\FrameworkBundle\Controller\Controller; |
| 7 | 7 | use Symfony\Component\HttpFoundation\Request; |
| 8 | -use Symfony\Component\HttpKernel\Exception\NotFoundHttpException; |
|
| 9 | 8 | use Xtools\ProjectRepository; |
| 10 | 9 | |
| 11 | 10 | class AutomatedEditsController extends Controller |
@@ -6,7 +6,6 @@ |
||
| 6 | 6 | use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route; |
| 7 | 7 | use Symfony\Bundle\FrameworkBundle\Controller\Controller; |
| 8 | 8 | use Symfony\Component\HttpFoundation\Request; |
| 9 | -use Symfony\Component\HttpKernel\Exception\NotFoundHttpException; |
|
| 10 | 9 | use Xtools\ProjectRepository; |
| 11 | 10 | |
| 12 | 11 | class PagesController extends Controller |
@@ -57,7 +57,7 @@ discard block |
||
| 57 | 57 | 'username' => $username, |
| 58 | 58 | ]); |
| 59 | 59 | } elseif ($projectQuery != "") { |
| 60 | - return $this->redirectToRoute("PagesProject", [ 'project'=>$projectQuery ]); |
|
| 60 | + return $this->redirectToRoute("PagesProject", ['project'=>$projectQuery]); |
|
| 61 | 61 | } |
| 62 | 62 | |
| 63 | 63 | // set default wiki so we can populate the namespace selector |
@@ -183,7 +183,7 @@ discard block |
||
| 183 | 183 | JOIN $revisionTable ON page_id = rev_page |
| 184 | 184 | $paJoin |
| 185 | 185 | WHERE $whereRev AND rev_parent_id = '0' $namespaceConditionRev $redirectCondition |
| 186 | - " . ($hasPageAssessments ? "GROUP BY rev_page" : "") . " |
|
| 186 | + ".($hasPageAssessments ? "GROUP BY rev_page" : "")." |
|
| 187 | 187 | ) |
| 188 | 188 | |
| 189 | 189 | UNION |
@@ -267,8 +267,8 @@ discard block |
||
| 267 | 267 | } |
| 268 | 268 | |
| 269 | 269 | if ($total < 1) { |
| 270 | - $this->addFlash("notice", [ "no-result", $username ]); |
|
| 271 | - return $this->redirectToRoute("PagesProject", [ "project"=>$project ]); |
|
| 270 | + $this->addFlash("notice", ["no-result", $username]); |
|
| 271 | + return $this->redirectToRoute("PagesProject", ["project"=>$project]); |
|
| 272 | 272 | } |
| 273 | 273 | |
| 274 | 274 | ksort($pagesByNamespaceByDate); |
@@ -4,9 +4,7 @@ |
||
| 4 | 4 | |
| 5 | 5 | use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route; |
| 6 | 6 | use Symfony\Bundle\FrameworkBundle\Controller\Controller; |
| 7 | -use Symfony\Component\Config\Definition\Exception\Exception; |
|
| 8 | 7 | use Symfony\Component\HttpFoundation\Request; |
| 9 | -use Symfony\Component\HttpKernel\Exception\NotFoundHttpException; |
|
| 10 | 8 | use Xtools\ProjectRepository; |
| 11 | 9 | |
| 12 | 10 | class SimpleEditCounterController extends Controller |
@@ -2,10 +2,8 @@ |
||
| 2 | 2 | |
| 3 | 3 | namespace AppBundle\Helper; |
| 4 | 4 | |
| 5 | -use Symfony\Component\Config\Definition\Exception\Exception; |
|
| 6 | 5 | use Symfony\Component\HttpKernel\Exception\NotFoundHttpException; |
| 7 | 6 | use Symfony\Component\DependencyInjection\ContainerInterface; |
| 8 | -use Symfony\Component\VarDumper\VarDumper; |
|
| 9 | 7 | |
| 10 | 8 | class LabsHelper |
| 11 | 9 | { |
@@ -78,7 +78,7 @@ discard block |
||
| 78 | 78 | // Create the query we're going to run against the meta database |
| 79 | 79 | $wikiQuery = $this->client->createQueryBuilder(); |
| 80 | 80 | $wikiQuery |
| 81 | - ->select([ 'dbname', 'name', 'url', 'lang' ]) |
|
| 81 | + ->select(['dbname', 'name', 'url', 'lang']) |
|
| 82 | 82 | ->from('wiki') |
| 83 | 83 | ->where($wikiQuery->expr()->eq('dbname', ':project')) |
| 84 | 84 | // The meta database will have the project's URL stored as https://en.wikipedia.org |
@@ -129,7 +129,7 @@ discard block |
||
| 129 | 129 | public function allProjects() |
| 130 | 130 | { |
| 131 | 131 | $wikiQuery = $this->client->createQueryBuilder(); |
| 132 | - $wikiQuery->select([ 'dbName', 'name', 'url' ])->from('wiki'); |
|
| 132 | + $wikiQuery->select(['dbName', 'name', 'url'])->from('wiki'); |
|
| 133 | 133 | $stmt = $wikiQuery->execute(); |
| 134 | 134 | $out = $stmt->fetchAll(); |
| 135 | 135 | return $out; |
@@ -152,7 +152,7 @@ discard block |
||
| 152 | 152 | // as required by Labs. We combine $table with |
| 153 | 153 | // $table_extension in order to generate the new table name |
| 154 | 154 | if ($this->isLabs() && $table_extension !== null) { |
| 155 | - $table = $table . "_" . $table_extension; |
|
| 155 | + $table = $table."_".$table_extension; |
|
| 156 | 156 | } |
| 157 | 157 | |
| 158 | 158 | // Use the table specified in the table mapping configuration, if present. |