@@ -136,8 +136,8 @@ |
||
136 | 136 | $titles = []; |
137 | 137 | |
138 | 138 | while ($row = $sth->fetch()) { |
139 | - $titles[] = $namespaces[$row['page_namespace']] . |
|
140 | - ':' .$row['page_title']; |
|
139 | + $titles[] = $namespaces[$row['page_namespace']]. |
|
140 | + ':'.$row['page_title']; |
|
141 | 141 | } |
142 | 142 | |
143 | 143 | // Chunking... it's possible to make a URI too long |
@@ -197,7 +197,7 @@ |
||
197 | 197 | |
198 | 198 | // Number the quotes, since they somehow have significance. |
199 | 199 | foreach ($quotes as $index => $quote) { |
200 | - $numberedQuotes[(string)($index + 1)] = $quote; |
|
200 | + $numberedQuotes[(string)($index+1)] = $quote; |
|
201 | 201 | } |
202 | 202 | |
203 | 203 | return new JsonResponse($numberedQuotes, Response::HTTP_OK); |
@@ -1,5 +1,5 @@ |
||
1 | 1 | <?php |
2 | -declare(strict_types = 1); |
|
2 | +declare(strict_types=1); |
|
3 | 3 | |
4 | 4 | use Symfony\Component\HttpFoundation\Request; |
5 | 5 |
@@ -504,7 +504,7 @@ discard block |
||
504 | 504 | $params = $this->convertLegacyParams($params); |
505 | 505 | |
506 | 506 | // Remove blank values. |
507 | - return array_filter($params, function ($param) { |
|
507 | + return array_filter($params, function($param) { |
|
508 | 508 | // 'namespace' or 'username' could be '0'. |
509 | 509 | return null !== $param && '' !== $param; |
510 | 510 | }); |
@@ -655,7 +655,7 @@ discard block |
||
655 | 655 | $response->setStatusCode(Response::HTTP_OK); |
656 | 656 | |
657 | 657 | $elapsedTime = round( |
658 | - microtime(true) - $this->request->server->get('REQUEST_TIME_FLOAT'), |
|
658 | + microtime(true)-$this->request->server->get('REQUEST_TIME_FLOAT'), |
|
659 | 659 | 3 |
660 | 660 | ); |
661 | 661 | |
@@ -682,7 +682,7 @@ discard block |
||
682 | 682 | $conn = $this->container->get('doctrine') |
683 | 683 | ->getManager('default') |
684 | 684 | ->getConnection(); |
685 | - $date = date('Y-m-d'); |
|
685 | + $date = date('Y-m-d'); |
|
686 | 686 | |
687 | 687 | // Increment count in timeline |
688 | 688 | $existsSql = "SELECT 1 FROM usage_api_timeline |
@@ -128,7 +128,7 @@ |
||
128 | 128 | // 'Category:', which sometimes is used cross-wiki (because it still works). |
129 | 129 | $normalized = false; |
130 | 130 | $nsName = $this->project->getNamespaces()[14].':'; |
131 | - $this->categories = array_map(function ($category) use ($nsName, &$normalized) { |
|
131 | + $this->categories = array_map(function($category) use ($nsName, &$normalized) { |
|
132 | 132 | if (0 === strpos($category, $nsName) || 0 === strpos($category, 'Category:')) { |
133 | 133 | $normalized = true; |
134 | 134 | } |
@@ -104,7 +104,7 @@ discard block |
||
104 | 104 | public function loginAction(): RedirectResponse |
105 | 105 | { |
106 | 106 | try { |
107 | - [ $next, $token ] = $this->getOauthClient()->initiate(); |
|
107 | + [$next, $token] = $this->getOauthClient()->initiate(); |
|
108 | 108 | } catch (Exception $oauthException) { |
109 | 109 | throw $oauthException; |
110 | 110 | // @TODO Make this work. |
@@ -174,7 +174,7 @@ discard block |
||
174 | 174 | . '?title=Special:OAuth'; |
175 | 175 | $conf = new ClientConfig($endpoint); |
176 | 176 | $consumerKey = $this->getParameter('oauth_key'); |
177 | - $consumerSecret = $this->getParameter('oauth_secret'); |
|
177 | + $consumerSecret = $this->getParameter('oauth_secret'); |
|
178 | 178 | $conf->setConsumer(new Consumer($consumerKey, $consumerSecret)); |
179 | 179 | $this->oauthClient = new Client($conf); |
180 | 180 | // Callback URL is hardcoded in the consumer registration. |
@@ -1,5 +1,5 @@ |
||
1 | 1 | <?php |
2 | -declare(strict_types = 1); |
|
2 | +declare(strict_types=1); |
|
3 | 3 | |
4 | 4 | /** |
5 | 5 | * This file contains only the XtoolsHttpException class. |
@@ -1,5 +1,5 @@ |
||
1 | 1 | <?php |
2 | -declare(strict_types = 1); |
|
2 | +declare(strict_types=1); |
|
3 | 3 | |
4 | 4 | /** |
5 | 5 | * This file contains only the AppBundle class. |
@@ -1,5 +1,5 @@ |
||
1 | 1 | <?php |
2 | -declare(strict_types = 1); |
|
2 | +declare(strict_types=1); |
|
3 | 3 | |
4 | 4 | /** |
5 | 5 | * This file contains only the ExceptionListener class. |