@@ -92,7 +92,7 @@ discard block |
||
| 92 | 92 | $info = $this->getPageInfo(); |
| 93 | 93 | $title = isset($info['title']) ? $info['title'] : $this->unnormalizedPageName; |
| 94 | 94 | $nsName = $this->getNamespaceName(); |
| 95 | - return str_replace($nsName . ':', '', $title); |
|
| 95 | + return str_replace($nsName.':', '', $title); |
|
| 96 | 96 | } |
| 97 | 97 | |
| 98 | 98 | /** |
@@ -228,7 +228,7 @@ discard block |
||
| 228 | 228 | { |
| 229 | 229 | // If a user is given, we will not cache the result via instance variable. |
| 230 | 230 | if ($user !== null) { |
| 231 | - return (int) $this->getRepository()->getNumRevisions($this, $user); |
|
| 231 | + return (int)$this->getRepository()->getNumRevisions($this, $user); |
|
| 232 | 232 | } |
| 233 | 233 | |
| 234 | 234 | // Return cached value, if present. |
@@ -241,7 +241,7 @@ discard block |
||
| 241 | 241 | $this->numRevisions = count($this->revisions); |
| 242 | 242 | } else { |
| 243 | 243 | // Otherwise do a COUNT in the event fetching all revisions is not desired. |
| 244 | - $this->numRevisions = (int) $this->getRepository()->getNumRevisions($this); |
|
| 244 | + $this->numRevisions = (int)$this->getRepository()->getNumRevisions($this); |
|
| 245 | 245 | } |
| 246 | 246 | |
| 247 | 247 | return $this->numRevisions; |
@@ -271,7 +271,7 @@ discard block |
||
| 271 | 271 | { |
| 272 | 272 | $content = $this->getRepository()->getPagesWikitext( |
| 273 | 273 | $this->getProject(), |
| 274 | - [ $this->getTitle() ] |
|
| 274 | + [$this->getTitle()] |
|
| 275 | 275 | ); |
| 276 | 276 | |
| 277 | 277 | return isset($content[$this->getTitle()]) |
@@ -533,8 +533,8 @@ discard block |
||
| 533 | 533 | return 0; |
| 534 | 534 | } |
| 535 | 535 | |
| 536 | - return array_sum(array_map(function ($item) { |
|
| 537 | - return (int) $item['views']; |
|
| 536 | + return array_sum(array_map(function($item) { |
|
| 537 | + return (int)$item['views']; |
|
| 538 | 538 | }, $pageviews['items'])); |
| 539 | 539 | } |
| 540 | 540 | |
@@ -339,9 +339,9 @@ |
||
| 339 | 339 | $conn = $this->getProjectsConnection(); |
| 340 | 340 | $pageTable = $this->getTableName($project->getDatabaseName(), 'page'); |
| 341 | 341 | $query = "SELECT page_id " |
| 342 | - . " FROM $pageTable " |
|
| 343 | - . " WHERE page_namespace = :ns AND page_title = :title AND page_len > 0 " |
|
| 344 | - . " LIMIT 1"; |
|
| 342 | + . " FROM $pageTable " |
|
| 343 | + . " WHERE page_namespace = :ns AND page_title = :title AND page_len > 0 " |
|
| 344 | + . " LIMIT 1"; |
|
| 345 | 345 | $params = [ |
| 346 | 346 | 'ns' => $namespaceId, |
| 347 | 347 | 'title' => str_replace(' ', '_', $pageTitle), |