@@ -14,7 +14,6 @@ |
||
| 14 | 14 | use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route; |
| 15 | 15 | use Symfony\Bundle\FrameworkBundle\Controller\Controller; |
| 16 | 16 | use Symfony\Component\HttpFoundation\Request; |
| 17 | -use Symfony\Component\HttpKernel\Exception\NotFoundHttpException; |
|
| 18 | 17 | use Xtools\ProjectRepository; |
| 19 | 18 | use Xtools\RFA; |
| 20 | 19 | |
@@ -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; |
@@ -489,7 +489,9 @@ |
||
| 489 | 489 | */ |
| 490 | 490 | public function quote() |
| 491 | 491 | { |
| 492 | - if (!$this->container->getParameter("enable.bash")) return ""; |
|
| 492 | + if (!$this->container->getParameter("enable.bash")) { |
|
| 493 | + return ""; |
|
| 494 | + } |
|
| 493 | 495 | $quotes = $this->container->getParameter('quotes'); |
| 494 | 496 | $id = array_rand($quotes); |
| 495 | 497 | return $quotes[$id]; |
@@ -363,8 +363,7 @@ |
||
| 363 | 363 | foreach($res["query"]["pages"] as $key => $value) { |
| 364 | 364 | if(isset($value["revisions"][0]["*"])) { |
| 365 | 365 | $result[$value["title"]] = $value["revisions"][0]["*"]; |
| 366 | - } |
|
| 367 | - else { |
|
| 366 | + } else { |
|
| 368 | 367 | $result[$value["title"]] = ""; |
| 369 | 368 | } |
| 370 | 369 | } |
@@ -208,8 +208,7 @@ |
||
| 208 | 208 | |
| 209 | 209 | try { |
| 210 | 210 | $api = MediawikiApi::newFromPage($projectUrl); |
| 211 | - } |
|
| 212 | - catch (\Exception $e) { |
|
| 211 | + } catch (\Exception $e) { |
|
| 213 | 212 | return null; |
| 214 | 213 | } |
| 215 | 214 | |
@@ -89,8 +89,7 @@ |
||
| 89 | 89 | $sectionName = strtolower($sectionName); |
| 90 | 90 | if (!isset($this->data[$sectionName])) { |
| 91 | 91 | return []; |
| 92 | - } |
|
| 93 | - else { |
|
| 92 | + } else { |
|
| 94 | 93 | return $this->data[$sectionName]; |
| 95 | 94 | } |
| 96 | 95 | } |