@@ -262,7 +262,7 @@ discard block |
||
| 262 | 262 | throw new XtoolsHttpException( |
| 263 | 263 | $this->i18n->msg('not-opted-in', [ |
| 264 | 264 | $this->getOptedInPage()->getTitle(), |
| 265 | - $this->i18n->msg('not-opted-in-link') . |
|
| 265 | + $this->i18n->msg('not-opted-in-link'). |
|
| 266 | 266 | ' <https://www.mediawiki.org/wiki/Special:MyLanguage/XTools/Edit_Counter#restricted_stats>', |
| 267 | 267 | $this->i18n->msg('not-opted-in-login'), |
| 268 | 268 | ]), |
@@ -701,7 +701,7 @@ discard block |
||
| 701 | 701 | $params = $this->convertLegacyParams($params); |
| 702 | 702 | |
| 703 | 703 | // Remove blank values. |
| 704 | - return array_filter($params, function ($param) { |
|
| 704 | + return array_filter($params, function($param) { |
|
| 705 | 705 | // 'namespace' or 'username' could be '0'. |
| 706 | 706 | return null !== $param && '' !== $param; |
| 707 | 707 | }); |
@@ -759,7 +759,7 @@ discard block |
||
| 759 | 759 | // Show warnings that the date range was truncated. |
| 760 | 760 | $this->addFlashMessage('warning', 'date-range-too-wide', [$this->maxDays()]); |
| 761 | 761 | |
| 762 | - $startTime = strtotime('-' . $this->maxDays() . ' days', $endTime); |
|
| 762 | + $startTime = strtotime('-'.$this->maxDays().' days', $endTime); |
|
| 763 | 763 | } |
| 764 | 764 | |
| 765 | 765 | return [$startTime, $endTime]; |
@@ -902,7 +902,7 @@ discard block |
||
| 902 | 902 | } |
| 903 | 903 | |
| 904 | 904 | $elapsedTime = round( |
| 905 | - microtime(true) - $this->request->server->get('REQUEST_TIME_FLOAT'), |
|
| 905 | + microtime(true)-$this->request->server->get('REQUEST_TIME_FLOAT'), |
|
| 906 | 906 | 3 |
| 907 | 907 | ); |
| 908 | 908 | |
@@ -943,7 +943,7 @@ discard block |
||
| 943 | 943 | public function addFullPageTitlesAndContinue(string $key, array $out, array $data): array |
| 944 | 944 | { |
| 945 | 945 | // Add full_page_title (in addition to the existing page_title and page_namespace keys). |
| 946 | - $out[$key] = array_map(function ($rev) { |
|
| 946 | + $out[$key] = array_map(function($rev) { |
|
| 947 | 947 | return array_merge([ |
| 948 | 948 | 'full_page_title' => $this->getPageFromNsAndTitle( |
| 949 | 949 | (int)$rev['page_namespace'], |
@@ -979,7 +979,7 @@ discard block |
||
| 979 | 979 | $conn = $this->container->get('doctrine') |
| 980 | 980 | ->getManager('default') |
| 981 | 981 | ->getConnection(); |
| 982 | - $date = date('Y-m-d'); |
|
| 982 | + $date = date('Y-m-d'); |
|
| 983 | 983 | |
| 984 | 984 | // Increment count in timeline |
| 985 | 985 | try { |
@@ -64,7 +64,7 @@ discard block |
||
| 64 | 64 | ProjectRepository $projectRepo |
| 65 | 65 | ): RedirectResponse { |
| 66 | 66 | try { |
| 67 | - [ $next, $token ] = $this->getOauthClient($request, $projectRepo)->initiate(); |
|
| 67 | + [$next, $token] = $this->getOauthClient($request, $projectRepo)->initiate(); |
|
| 68 | 68 | } catch (Exception $oauthException) { |
| 69 | 69 | throw $oauthException; |
| 70 | 70 | // @TODO Make this work. |
@@ -149,7 +149,7 @@ discard block |
||
| 149 | 149 | . '?title=Special:OAuth'; |
| 150 | 150 | $conf = new ClientConfig($endpoint); |
| 151 | 151 | $consumerKey = $this->getParameter('oauth_key'); |
| 152 | - $consumerSecret = $this->getParameter('oauth_secret'); |
|
| 152 | + $consumerSecret = $this->getParameter('oauth_secret'); |
|
| 153 | 153 | $conf->setConsumer(new Consumer($consumerKey, $consumerSecret)); |
| 154 | 154 | $this->oauthClient = new Client($conf); |
| 155 | 155 | |
@@ -1,6 +1,6 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | -declare(strict_types = 1); |
|
| 3 | +declare(strict_types=1); |
|
| 4 | 4 | |
| 5 | 5 | namespace App\Repository; |
| 6 | 6 | |
@@ -53,7 +53,7 @@ discard block |
||
| 53 | 53 | PageRepository $pageRepo, |
| 54 | 54 | UserRepository $userRepo |
| 55 | 55 | ) { |
| 56 | - $this->autoEditsHelper= $autoEditsHelper; |
|
| 56 | + $this->autoEditsHelper = $autoEditsHelper; |
|
| 57 | 57 | $this->editRepo = $editRepo; |
| 58 | 58 | $this->pageRepo = $pageRepo; |
| 59 | 59 | $this->userRepo = $userRepo; |
@@ -1,6 +1,6 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | -declare(strict_types = 1); |
|
| 3 | +declare(strict_types=1); |
|
| 4 | 4 | |
| 5 | 5 | namespace App\Model; |
| 6 | 6 | |
@@ -48,7 +48,7 @@ discard block |
||
| 48 | 48 | $this->repository = $repository; |
| 49 | 49 | $this->project = $project; |
| 50 | 50 | $this->user = $user; |
| 51 | - $this->categories = array_map(function ($category) { |
|
| 51 | + $this->categories = array_map(function($category) { |
|
| 52 | 52 | return str_replace(' ', '_', $category); |
| 53 | 53 | }, $categories); |
| 54 | 54 | $this->start = $start; |
@@ -80,7 +80,7 @@ discard block |
||
| 80 | 80 | */ |
| 81 | 81 | public function getCategoriesNormalized(): array |
| 82 | 82 | { |
| 83 | - return array_map(function ($category) { |
|
| 83 | + return array_map(function($category) { |
|
| 84 | 84 | return str_replace('_', ' ', $category); |
| 85 | 85 | }, $this->categories); |
| 86 | 86 | } |