@@ -345,7 +345,7 @@ discard block |
||
| 345 | 345 | } |
| 346 | 346 | |
| 347 | 347 | $res['automated_editcount'] = $this->autoEdits->getAutomatedCount(); |
| 348 | - $res['nonautomated_editcount'] = $res['total_editcount'] - $res['automated_editcount']; |
|
| 348 | + $res['nonautomated_editcount'] = $res['total_editcount']-$res['automated_editcount']; |
|
| 349 | 349 | |
| 350 | 350 | $response->setData($res); |
| 351 | 351 | return $response; |
@@ -395,7 +395,7 @@ discard block |
||
| 395 | 395 | |
| 396 | 396 | $namespaces = $this->project->getNamespaces(); |
| 397 | 397 | |
| 398 | - $ret['nonautomated_edits'] = array_map(function ($rev) use ($namespaces) { |
|
| 398 | + $ret['nonautomated_edits'] = array_map(function($rev) use ($namespaces) { |
|
| 399 | 399 | $pageTitle = $rev['page_title']; |
| 400 | 400 | if ((int)$rev['page_namespace'] === 0) { |
| 401 | 401 | $fullPageTitle = $pageTitle; |
@@ -457,7 +457,7 @@ discard block |
||
| 457 | 457 | |
| 458 | 458 | $namespaces = $this->project->getNamespaces(); |
| 459 | 459 | |
| 460 | - $ret['nonautomated_edits'] = array_map(function ($rev) use ($namespaces) { |
|
| 460 | + $ret['nonautomated_edits'] = array_map(function($rev) use ($namespaces) { |
|
| 461 | 461 | $pageTitle = $rev['page_title']; |
| 462 | 462 | if ((int)$rev['page_namespace'] === 0) { |
| 463 | 463 | $fullPageTitle = $pageTitle; |
@@ -241,7 +241,7 @@ discard block |
||
| 241 | 241 | */ |
| 242 | 242 | private function getEditsFromRevs(array $revs) |
| 243 | 243 | { |
| 244 | - return array_map(function ($rev) { |
|
| 244 | + return array_map(function($rev) { |
|
| 245 | 245 | /* @var Page Page object to be passed to the Edit contructor. */ |
| 246 | 246 | $page = $this->getPageFromRev($rev); |
| 247 | 247 | $rev['user'] = $this->user; |
@@ -305,8 +305,8 @@ discard block |
||
| 305 | 305 | public function getToolsTotal() |
| 306 | 306 | { |
| 307 | 307 | if (!is_int($this->toolsTotal)) { |
| 308 | - $this->toolsTotal = array_reduce($this->getToolCounts(), function ($a, $b) { |
|
| 309 | - return $a + $b['count']; |
|
| 308 | + $this->toolsTotal = array_reduce($this->getToolCounts(), function($a, $b) { |
|
| 309 | + return $a+$b['count']; |
|
| 310 | 310 | }); |
| 311 | 311 | } |
| 312 | 312 | |
@@ -281,7 +281,7 @@ discard block |
||
| 281 | 281 | $isSection = preg_match_all("/^\/\* (.*?) \*\//", $summary, $sectionMatch); |
| 282 | 282 | |
| 283 | 283 | if ($isSection && isset($page)) { |
| 284 | - $pageUrl = $project->getUrl(false) . str_replace( |
|
| 284 | + $pageUrl = $project->getUrl(false).str_replace( |
|
| 285 | 285 | '$1', |
| 286 | 286 | $page->getTitle($useUnnormalizedPageTitle), |
| 287 | 287 | $project->getArticlePath() |
@@ -291,8 +291,8 @@ discard block |
||
| 291 | 291 | // Must have underscores for the link to properly go to the section. |
| 292 | 292 | $sectionTitleLink = htmlspecialchars(str_replace(' ', '_', $sectionTitle)); |
| 293 | 293 | |
| 294 | - $sectionWikitext = "<a target='_blank' href='$pageUrl#$sectionTitleLink'>→</a>" . |
|
| 295 | - "<em class='text-muted'>" . htmlspecialchars($sectionTitle) . ":</em> "; |
|
| 294 | + $sectionWikitext = "<a target='_blank' href='$pageUrl#$sectionTitleLink'>→</a>". |
|
| 295 | + "<em class='text-muted'>".htmlspecialchars($sectionTitle).":</em> "; |
|
| 296 | 296 | $summary = str_replace($sectionMatch[0][0], $sectionWikitext, $summary); |
| 297 | 297 | } |
| 298 | 298 | |
@@ -306,7 +306,7 @@ discard block |
||
| 306 | 306 | ); |
| 307 | 307 | |
| 308 | 308 | // Use normalized page title (underscored, capitalized). |
| 309 | - $pageUrl = $project->getUrl(false) . str_replace( |
|
| 309 | + $pageUrl = $project->getUrl(false).str_replace( |
|
| 310 | 310 | '$1', |
| 311 | 311 | ucfirst(str_replace(' ', '_', $wikiLinkPath)), |
| 312 | 312 | $project->getArticlePath() |
@@ -344,8 +344,8 @@ discard block |
||
| 344 | 344 | public function getDiffUrl() |
| 345 | 345 | { |
| 346 | 346 | $project = $this->getProject(); |
| 347 | - $path = str_replace('$1', 'Special:Diff/' . $this->id, $project->getArticlePath()); |
|
| 348 | - return rtrim($project->getUrl(), '/') . $path; |
|
| 347 | + $path = str_replace('$1', 'Special:Diff/'.$this->id, $project->getArticlePath()); |
|
| 348 | + return rtrim($project->getUrl(), '/').$path; |
|
| 349 | 349 | } |
| 350 | 350 | |
| 351 | 351 | /** |
@@ -355,8 +355,8 @@ discard block |
||
| 355 | 355 | public function getPermaUrl() |
| 356 | 356 | { |
| 357 | 357 | $project = $this->getProject(); |
| 358 | - $path = str_replace('$1', 'Special:PermaLink/' . $this->id, $project->getArticlePath()); |
|
| 359 | - return rtrim($project->getUrl(), '/') . $path; |
|
| 358 | + $path = str_replace('$1', 'Special:PermaLink/'.$this->id, $project->getArticlePath()); |
|
| 359 | + return rtrim($project->getUrl(), '/').$path; |
|
| 360 | 360 | } |
| 361 | 361 | |
| 362 | 362 | /** |
@@ -388,7 +388,7 @@ discard block |
||
| 388 | 388 | */ |
| 389 | 389 | public function isAutomated(Container $container) |
| 390 | 390 | { |
| 391 | - return (bool) $this->getTool($container); |
|
| 391 | + return (bool)$this->getTool($container); |
|
| 392 | 392 | } |
| 393 | 393 | |
| 394 | 394 | /** |