@@ -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([ |
@@ -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'], |
@@ -1060,7 +1060,7 @@ discard block |
||
1060 | 1060 | */ |
1061 | 1061 | protected function addApiWarningAboutDates(array $keys): void |
1062 | 1062 | { |
1063 | - $this->addFlash('warning', 'In XTools 3.20, the ' . $this->i18n->getIntuition()->listToText($keys) . |
|
1063 | + $this->addFlash('warning', 'In XTools 3.20, the '.$this->i18n->getIntuition()->listToText($keys). |
|
1064 | 1064 | ' properties will be returned in ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ'); |
1065 | 1065 | } |
1066 | 1066 | |
@@ -1069,7 +1069,7 @@ discard block |
||
1069 | 1069 | */ |
1070 | 1070 | protected function addApiWarningAboutPageTitles(): void |
1071 | 1071 | { |
1072 | - $this->addFlash('warning', 'In XTools 3.20, full_page_title and page_title will return ' . |
|
1072 | + $this->addFlash('warning', 'In XTools 3.20, full_page_title and page_title will return '. |
|
1073 | 1073 | 'page titles with spaces instead of underscores.'); |
1074 | 1074 | } |
1075 | 1075 | } |