@@ -3,7 +3,7 @@ |
||
3 | 3 | * This file contains only the PageAssessmentsRepository class. |
4 | 4 | */ |
5 | 5 | |
6 | -declare(strict_types = 1); |
|
6 | +declare(strict_types=1); |
|
7 | 7 | |
8 | 8 | namespace AppBundle\Repository; |
9 | 9 |
@@ -3,7 +3,7 @@ |
||
3 | 3 | * This file contains only the AdminStatsRepository class. |
4 | 4 | */ |
5 | 5 | |
6 | -declare(strict_types = 1); |
|
6 | +declare(strict_types=1); |
|
7 | 7 | |
8 | 8 | namespace AppBundle\Repository; |
9 | 9 |
@@ -3,7 +3,7 @@ |
||
3 | 3 | * This file contains only the CategoryEditsRepository class. |
4 | 4 | */ |
5 | 5 | |
6 | -declare(strict_types = 1); |
|
6 | +declare(strict_types=1); |
|
7 | 7 | |
8 | 8 | namespace AppBundle\Repository; |
9 | 9 |
@@ -3,7 +3,7 @@ |
||
3 | 3 | * This file contains only the UserRepository class. |
4 | 4 | */ |
5 | 5 | |
6 | -declare(strict_types = 1); |
|
6 | +declare(strict_types=1); |
|
7 | 7 | |
8 | 8 | namespace AppBundle\Repository; |
9 | 9 |
@@ -3,7 +3,7 @@ |
||
3 | 3 | * This file contains only the SimpleEditCounterRepository class. |
4 | 4 | */ |
5 | 5 | |
6 | -declare(strict_types = 1); |
|
6 | +declare(strict_types=1); |
|
7 | 7 | |
8 | 8 | namespace AppBundle\Repository; |
9 | 9 |
@@ -3,7 +3,7 @@ discard block |
||
3 | 3 | * This file contains only the Page class. |
4 | 4 | */ |
5 | 5 | |
6 | -declare(strict_types = 1); |
|
6 | +declare(strict_types=1); |
|
7 | 7 | |
8 | 8 | namespace AppBundle\Model; |
9 | 9 | |
@@ -93,7 +93,7 @@ discard block |
||
93 | 93 | $info = $this->getPageInfo(); |
94 | 94 | $title = $info['title'] ?? $this->unnormalizedPageName; |
95 | 95 | $nsName = $this->getNamespaceName(); |
96 | - return str_replace($nsName . ':', '', $title); |
|
96 | + return str_replace($nsName.':', '', $title); |
|
97 | 97 | } |
98 | 98 | |
99 | 99 | /** |
@@ -291,7 +291,7 @@ discard block |
||
291 | 291 | { |
292 | 292 | $content = $this->getRepository()->getPagesWikitext( |
293 | 293 | $this->getProject(), |
294 | - [ $this->getTitle() ] |
|
294 | + [$this->getTitle()] |
|
295 | 295 | ); |
296 | 296 | |
297 | 297 | return $content[$this->getTitle()] ?? null; |
@@ -359,7 +359,7 @@ discard block |
||
359 | 359 | |
360 | 360 | $wikidataInfo = $this->getRepository()->getWikidataInfo($this); |
361 | 361 | |
362 | - $terms = array_map(function ($entry) { |
|
362 | + $terms = array_map(function($entry) { |
|
363 | 363 | return $entry['term']; |
364 | 364 | }, $wikidataInfo); |
365 | 365 | |
@@ -370,7 +370,7 @@ discard block |
||
370 | 370 | 'prio' => 2, |
371 | 371 | 'name' => 'Wikidata', |
372 | 372 | 'notice' => "Label for language <em>$lang</em> is missing", // FIXME: i18n |
373 | - 'explanation' => "See: <a target='_blank' " . |
|
373 | + 'explanation' => "See: <a target='_blank' ". |
|
374 | 374 | "href='//www.wikidata.org/wiki/Help:Label'>Help:Label</a>", |
375 | 375 | ]; |
376 | 376 | } |
@@ -380,7 +380,7 @@ discard block |
||
380 | 380 | 'prio' => 3, |
381 | 381 | 'name' => 'Wikidata', |
382 | 382 | 'notice' => "Description for language <em>$lang</em> is missing", // FIXME: i18n |
383 | - 'explanation' => "See: <a target='_blank' " . |
|
383 | + 'explanation' => "See: <a target='_blank' ". |
|
384 | 384 | "href='//www.wikidata.org/wiki/Help:Description'>Help:Description</a>", |
385 | 385 | ]; |
386 | 386 | } |
@@ -458,7 +458,7 @@ discard block |
||
458 | 458 | return 0; |
459 | 459 | } |
460 | 460 | |
461 | - return array_sum(array_map(function ($item) { |
|
461 | + return array_sum(array_map(function($item) { |
|
462 | 462 | return (int)$item['views']; |
463 | 463 | }, $pageviews['items'])); |
464 | 464 | } |
@@ -3,7 +3,7 @@ |
||
3 | 3 | * This file contains only the Model class. |
4 | 4 | */ |
5 | 5 | |
6 | -declare(strict_types = 1); |
|
6 | +declare(strict_types=1); |
|
7 | 7 | |
8 | 8 | namespace AppBundle\Model; |
9 | 9 |
@@ -3,7 +3,7 @@ discard block |
||
3 | 3 | * This file contains only the Project class. |
4 | 4 | */ |
5 | 5 | |
6 | -declare(strict_types = 1); |
|
6 | +declare(strict_types=1); |
|
7 | 7 | |
8 | 8 | namespace AppBundle\Model; |
9 | 9 | |
@@ -145,7 +145,7 @@ discard block |
||
145 | 145 | */ |
146 | 146 | public function getUrl(bool $withTrailingSlash = true): string |
147 | 147 | { |
148 | - return rtrim($this->getBasicInfo()['url'], '/') . ($withTrailingSlash ? '/' : ''); |
|
148 | + return rtrim($this->getBasicInfo()['url'], '/').($withTrailingSlash ? '/' : ''); |
|
149 | 149 | } |
150 | 150 | |
151 | 151 | /** |
@@ -190,7 +190,7 @@ discard block |
||
190 | 190 | public function getScript(): string |
191 | 191 | { |
192 | 192 | $metadata = $this->getMetadata(); |
193 | - return $metadata['general']['script'] ?? $this->getScriptPath() . '/index.php'; |
|
193 | + return $metadata['general']['script'] ?? $this->getScriptPath().'/index.php'; |
|
194 | 194 | } |
195 | 195 | |
196 | 196 | /** |
@@ -199,7 +199,7 @@ discard block |
||
199 | 199 | */ |
200 | 200 | public function getApiUrl(): string |
201 | 201 | { |
202 | - return rtrim($this->getUrl(), '/') . $this->getRepository()->getApiPath(); |
|
202 | + return rtrim($this->getUrl(), '/').$this->getRepository()->getApiPath(); |
|
203 | 203 | } |
204 | 204 | |
205 | 205 | /** |
@@ -258,7 +258,7 @@ discard block |
||
258 | 258 | */ |
259 | 259 | public function userOptInPage(User $user): string |
260 | 260 | { |
261 | - $localPageName = 'User:' . $user->getUsername() . '/EditCounterOptIn.js'; |
|
261 | + $localPageName = 'User:'.$user->getUsername().'/EditCounterOptIn.js'; |
|
262 | 262 | return $localPageName; |
263 | 263 | } |
264 | 264 | |
@@ -293,7 +293,7 @@ discard block |
||
293 | 293 | } |
294 | 294 | |
295 | 295 | // 4. Lastly, see if they've opted in globally on the default project or Meta. |
296 | - $globalPageName = $user->getUsername() . '/EditCounterGlobalOptIn.js'; |
|
296 | + $globalPageName = $user->getUsername().'/EditCounterGlobalOptIn.js'; |
|
297 | 297 | $globalProject = $this->getRepository()->getGlobalProject(); |
298 | 298 | if ($globalProject instanceof Project) { |
299 | 299 | $globalExists = $globalProject->getRepository() |
@@ -3,7 +3,7 @@ discard block |
||
3 | 3 | * An RFX object contains the parsed information for an RFX |
4 | 4 | */ |
5 | 5 | |
6 | -declare(strict_types = 1); |
|
6 | +declare(strict_types=1); |
|
7 | 7 | |
8 | 8 | namespace AppBundle\Model; |
9 | 9 | |
@@ -106,7 +106,7 @@ discard block |
||
106 | 106 | } |
107 | 107 | } |
108 | 108 | |
109 | - $final = []; // initialize the final array |
|
109 | + $final = []; // initialize the final array |
|
110 | 110 | $finalRaw = []; // Initialize the raw data array |
111 | 111 | |
112 | 112 | foreach (array_keys($this->data) as $key) { |
@@ -119,7 +119,7 @@ discard block |
||
119 | 119 | |
120 | 120 | $final = array_count_values($final); // find repetition and its count |
121 | 121 | |
122 | - $final = array_diff($final, [1]); // remove single occurrences |
|
122 | + $final = array_diff($final, [1]); // remove single occurrences |
|
123 | 123 | |
124 | 124 | $this->duplicates = array_keys($final); |
125 | 125 | } |