@@ -296,7 +296,7 @@ discard block |
||
| 296 | 296 | throw new XtoolsHttpException( |
| 297 | 297 | $this->i18n->msg('not-opted-in', [ |
| 298 | 298 | $this->getOptedInPage()->getTitle(), |
| 299 | - $this->i18n->msg('not-opted-in-link') . |
|
| 299 | + $this->i18n->msg('not-opted-in-link'). |
|
| 300 | 300 | ' <https://www.mediawiki.org/wiki/Special:MyLanguage/XTools/Edit_Counter#restricted_stats>', |
| 301 | 301 | $this->i18n->msg('not-opted-in-login'), |
| 302 | 302 | ]), |
@@ -580,7 +580,7 @@ discard block |
||
| 580 | 580 | } |
| 581 | 581 | |
| 582 | 582 | throw new XtoolsHttpException( |
| 583 | - $this->i18n->msg('too-many-edits', [ $user->maxEdits() ]), |
|
| 583 | + $this->i18n->msg('too-many-edits', [$user->maxEdits()]), |
|
| 584 | 584 | $this->generateUrl($this->tooHighEditCountRoute(), $this->params), |
| 585 | 585 | $originalParams, |
| 586 | 586 | $this->isApi, |
@@ -728,7 +728,7 @@ discard block |
||
| 728 | 728 | $params = $this->convertLegacyParams($params); |
| 729 | 729 | |
| 730 | 730 | // Remove blank values. |
| 731 | - return array_filter($params, function ($param) { |
|
| 731 | + return array_filter($params, function($param) { |
|
| 732 | 732 | // 'namespace' or 'username' could be '0'. |
| 733 | 733 | return null !== $param && '' !== $param; |
| 734 | 734 | }); |
@@ -786,7 +786,7 @@ discard block |
||
| 786 | 786 | // Show warnings that the date range was truncated. |
| 787 | 787 | $this->addFlashMessage('warning', 'date-range-too-wide', [$this->maxDays()]); |
| 788 | 788 | |
| 789 | - $startTime = strtotime('-' . $this->maxDays() . ' days', $endTime); |
|
| 789 | + $startTime = strtotime('-'.$this->maxDays().' days', $endTime); |
|
| 790 | 790 | } |
| 791 | 791 | |
| 792 | 792 | return [$startTime, $endTime]; |
@@ -958,7 +958,7 @@ discard block |
||
| 958 | 958 | } |
| 959 | 959 | |
| 960 | 960 | $elapsedTime = round( |
| 961 | - microtime(true) - $_SERVER['REQUEST_TIME_FLOAT'], |
|
| 961 | + microtime(true)-$_SERVER['REQUEST_TIME_FLOAT'], |
|
| 962 | 962 | 3 |
| 963 | 963 | ); |
| 964 | 964 | return array_merge($params, ['elapsed_time' => $elapsedTime]); |
@@ -988,7 +988,7 @@ discard block |
||
| 988 | 988 | public function addFullPageTitlesAndContinue(string $key, array $out, array $data): array |
| 989 | 989 | { |
| 990 | 990 | // Add full_page_title (in addition to the existing page_title and namespace keys). |
| 991 | - $out[$key] = array_map(function ($rev) { |
|
| 991 | + $out[$key] = array_map(function($rev) { |
|
| 992 | 992 | return array_merge([ |
| 993 | 993 | 'full_page_title' => $this->getPageFromNsAndTitle( |
| 994 | 994 | (int)$rev['namespace'], |
@@ -1056,13 +1056,13 @@ discard block |
||
| 1056 | 1056 | |
| 1057 | 1057 | protected function addApiWarningAboutDates(array $keys): void |
| 1058 | 1058 | { |
| 1059 | - $this->addFlash('warning', 'In XTools 3.20, the ' . $this->i18n->getIntuition()->listToText($keys) . |
|
| 1059 | + $this->addFlash('warning', 'In XTools 3.20, the '.$this->i18n->getIntuition()->listToText($keys). |
|
| 1060 | 1060 | ' properties will be returned in ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ'); |
| 1061 | 1061 | } |
| 1062 | 1062 | |
| 1063 | 1063 | protected function addApiWarningAboutPageTitles(): void |
| 1064 | 1064 | { |
| 1065 | - $this->addFlash('warning', 'In XTools 3.20, full_page_title and page_title will return ' . |
|
| 1065 | + $this->addFlash('warning', 'In XTools 3.20, full_page_title and page_title will return '. |
|
| 1066 | 1066 | 'page titles with spaces instead of underscores.'); |
| 1067 | 1067 | } |
| 1068 | 1068 | } |
@@ -273,10 +273,10 @@ discard block |
||
| 273 | 273 | |
| 274 | 274 | $this->addFlash('warning', 'In XTools 3.20, this endpoint will be renamed to /api/page/pageinfo'); |
| 275 | 275 | $this->addApiWarningAboutDates(['created_at', 'modified_at']); |
| 276 | - $this->addFlash('warning', 'In XTools 3.20, the author and author_editcount properties will be ' . |
|
| 276 | + $this->addFlash('warning', 'In XTools 3.20, the author and author_editcount properties will be '. |
|
| 277 | 277 | 'renamed to creator and creator_editcount, respectively.'); |
| 278 | 278 | $this->addFlash('warning', 'In XTools 3.20, the last_edit_id property will be renamed to modified_rev_id'); |
| 279 | - $this->addFlash('warning', 'In XTools 3.20, the watchers property will return null instead of 0 ' . |
|
| 279 | + $this->addFlash('warning', 'In XTools 3.20, the watchers property will return null instead of 0 '. |
|
| 280 | 280 | 'if the number of page watchers is unknown.'); |
| 281 | 281 | return $this->getFormattedApiResponse($data); |
| 282 | 282 | } |
@@ -349,7 +349,7 @@ discard block |
||
| 349 | 349 | $responseCode = Response::HTTP_OK; |
| 350 | 350 | $this->recordApiUsage('page/prose'); |
| 351 | 351 | $this->setupArticleInfo($articleInfoRepo, $autoEditsHelper); |
| 352 | - $this->addFlash('info', 'The algorithm used by this API has recently changed. ' . |
|
| 352 | + $this->addFlash('info', 'The algorithm used by this API has recently changed. '. |
|
| 353 | 353 | 'See https://www.mediawiki.org/wiki/XTools/Page_History#Prose for details.'); |
| 354 | 354 | $ret = $this->articleInfo->getProseStats(); |
| 355 | 355 | if (null === $ret) { |
@@ -176,7 +176,7 @@ discard block |
||
| 176 | 176 | // Send all to the template. |
| 177 | 177 | return $this->getFormattedResponse('topedits/result_article', [ |
| 178 | 178 | 'xtPage' => 'TopEdits', |
| 179 | - 'xtTitle' => $this->user->getUsername() . ' - ' . $this->page->getTitle(), |
|
| 179 | + 'xtTitle' => $this->user->getUsername().' - '.$this->page->getTitle(), |
|
| 180 | 180 | 'te' => $topEdits, |
| 181 | 181 | ]); |
| 182 | 182 | } |
@@ -316,7 +316,7 @@ discard block |
||
| 316 | 316 | |
| 317 | 317 | $this->addApiWarningAboutDates(['timestamp']); |
| 318 | 318 | if (false !== strpos($this->page->getTitle(true), '_')) { |
| 319 | - $this->addFlash('warning', 'In XTools 3.20, the page property will be returned ' . |
|
| 319 | + $this->addFlash('warning', 'In XTools 3.20, the page property will be returned '. |
|
| 320 | 320 | 'with spaces instead of underscores.'); |
| 321 | 321 | } |
| 322 | 322 | return $this->getFormattedApiResponse([ |