Completed
Pull Request — master (#33)
by Matthew
03:07
created
src/AppBundle/Controller/ArticleInfoController.php 4 patches
Doc Comments   -1 removed lines patch added patch discarded remove patch
@@ -380,7 +380,6 @@
 block discarded – undo
380 380
 
381 381
     /**
382 382
      * Get the size of the diff
383
-     * @param  int $rev The index of the revision within $this->pageHistory
384 383
      * @return int Size of the diff
385 384
      */
386 385
     private function getDiffSize($revIndex)
Please login to merge, or discard this patch.
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -164,7 +164,7 @@
 block discarded – undo
164 164
     private function getRevCount()
165 165
     {
166 166
         $query = "SELECT COUNT(*) AS count FROM " . $this->revisionTable
167
-                 . " WHERE rev_page = '" . $this->pageInfo['id'] . "'";
167
+                    . " WHERE rev_page = '" . $this->pageInfo['id'] . "'";
168 168
         $res = $this->conn->query($query)->fetchAll();
169 169
         return $res[0]['count'];
170 170
     }
Please login to merge, or discard this patch.
Spacing   +27 added lines, -27 removed lines patch added patch discarded remove patch
@@ -55,9 +55,9 @@  discard block
 block discarded – undo
55 55
         $article = $request->query->get('article');
56 56
 
57 57
         if ($projectQuery != '' && $article != '') {
58
-            return $this->redirectToRoute('ArticleInfoResult', [ 'project'=>$projectQuery, 'article' => $article ]);
58
+            return $this->redirectToRoute('ArticleInfoResult', ['project'=>$projectQuery, 'article' => $article]);
59 59
         } elseif ($article != '') {
60
-            return $this->redirectToRoute('ArticleInfoProject', [ 'project'=>$projectQuery ]);
60
+            return $this->redirectToRoute('ArticleInfoProject', ['project'=>$projectQuery]);
61 61
         }
62 62
 
63 63
         return $this->render('articleInfo/index.html.twig', [
@@ -101,7 +101,7 @@  discard block
 block discarded – undo
101 101
             'url' => $basicInfo['fullurl']
102 102
         ];
103 103
 
104
-        $this->pageInfo['watchers'] = ( isset($basicInfo['watchers']) ) ? $basicInfo['watchers'] : "< 30";
104
+        $this->pageInfo['watchers'] = (isset($basicInfo['watchers'])) ? $basicInfo['watchers'] : "< 30";
105 105
 
106 106
         $pageProps = isset($basicInfo['pageprops']) ? $basicInfo['pageprops'] : [];
107 107
 
@@ -164,8 +164,8 @@  discard block
 block discarded – undo
164 164
      */
165 165
     private function getRevCount()
166 166
     {
167
-        $query = "SELECT COUNT(*) AS count FROM " . $this->revisionTable
168
-                 . " WHERE rev_page = '" . $this->pageInfo['id'] . "'";
167
+        $query = "SELECT COUNT(*) AS count FROM ".$this->revisionTable
168
+                 . " WHERE rev_page = '".$this->pageInfo['id']."'";
169 169
         $res = $this->conn->query($query)->fetchAll();
170 170
         return $res[0]['count'];
171 171
     }
@@ -197,7 +197,7 @@  discard block
 block discarded – undo
197 197
                   FROM $this->revisionTable
198 198
                   LEFT JOIN $userGroupsTable ON rev_user = ug_user
199 199
                   LEFT JOIN $userFromerGroupsTable ON rev_user = ufg_user
200
-                  WHERE rev_page = " . $this->pageInfo['id'] . " AND (ug_group = 'bot' OR ufg_group = 'bot')
200
+                  WHERE rev_page = ".$this->pageInfo['id']." AND (ug_group = 'bot' OR ufg_group = 'bot')
201 201
                   GROUP BY rev_user_text";
202 202
         $res = $this->conn->query($query)->fetchAll();
203 203
 
@@ -206,14 +206,14 @@  discard block
 block discarded – undo
206 206
         $sum = 0;
207 207
         foreach ($res as $bot) {
208 208
             $bots[$bot['username']] = [
209
-                'count' => (int) $bot['count'],
209
+                'count' => (int)$bot['count'],
210 210
                 'current' => $bot['current'] === 'bot'
211 211
             ];
212 212
             $sum += $bot['count'];
213 213
         }
214 214
 
215
-        uasort($bots, function ($a, $b) {
216
-            return $b['count'] - $a['count'];
215
+        uasort($bots, function($a, $b) {
216
+            return $b['count']-$a['count'];
217 217
         });
218 218
 
219 219
         $this->pageInfo['general']['bot_revision_count'] = $sum;
@@ -261,10 +261,10 @@  discard block
 block discarded – undo
261 261
 
262 262
             if ($info['all'] > 1) {
263 263
                 // Number of seconds between first and last edit
264
-                $secs = intval(strtotime($info['last']) - strtotime($info['first']) / $info['all']);
264
+                $secs = intval(strtotime($info['last'])-strtotime($info['first']) / $info['all']);
265 265
 
266 266
                 // Average time between edits (in days)
267
-                $this->pageInfo['editors'][$editor]['atbe'] = $secs / ( 60 * 60 * 24 );
267
+                $this->pageInfo['editors'][$editor]['atbe'] = $secs / (60 * 60 * 24);
268 268
             }
269 269
 
270 270
             if (count($info['sizes'])) {
@@ -279,7 +279,7 @@  discard block
 block discarded – undo
279 279
 
280 280
         // First sort editors array by the amount of text they added
281 281
         $topTenEditorsByAdded = $this->pageInfo['editors'];
282
-        uasort($topTenEditorsByAdded, function ($a, $b) {
282
+        uasort($topTenEditorsByAdded, function($a, $b) {
283 283
             if ($a['added'] === $b['added']) {
284 284
                 return 0;
285 285
             }
@@ -288,7 +288,7 @@  discard block
 block discarded – undo
288 288
 
289 289
         // Then build a new array of top 10 editors by added text,
290 290
         //   in the data structure needed for the chart
291
-        $this->pageInfo['topTenEditorsByAdded'] = array_map(function ($editor) {
291
+        $this->pageInfo['topTenEditorsByAdded'] = array_map(function($editor) {
292 292
             $added = $this->pageInfo['editors'][$editor]['added'];
293 293
             return [
294 294
                 'label' => $editor,
@@ -334,7 +334,7 @@  discard block
 block discarded – undo
334 334
 
335 335
         // Transform to associative array by 'type'
336 336
         foreach ($res as $row) {
337
-            $data[$row['type'] . '_count'] = $row['value'];
337
+            $data[$row['type'].'_count'] = $row['value'];
338 338
         }
339 339
 
340 340
         return $data;
@@ -350,7 +350,7 @@  discard block
 block discarded – undo
350 350
         $title = str_replace(' ', '_', $this->pageInfo['title']);
351 351
         $query = "SELECT log_action, log_type, log_timestamp AS timestamp
352 352
                   FROM $loggingTable
353
-                  WHERE log_namespace = '" . $this->pageInfo['namespace'] . "'
353
+                  WHERE log_namespace = '".$this->pageInfo['namespace']."'
354 354
                   AND log_title = '$title' AND log_timestamp > 1
355 355
                   AND log_type IN ('delete', 'move', 'protect', 'stable')";
356 356
         $events = $this->conn->query($query)->fetchAll();
@@ -435,7 +435,7 @@  discard block
 block discarded – undo
435 435
         $conn = $this->container->get('doctrine')->getManager('replicas')->getConnection();
436 436
         $res = $conn->query($query)->fetchAll();
437 437
 
438
-        $terms = array_map(function ($entry) {
438
+        $terms = array_map(function($entry) {
439 439
             return $entry['term'];
440 440
         }, $res);
441 441
 
@@ -446,7 +446,7 @@  discard block
 block discarded – undo
446 446
                 'prio' => 2,
447 447
                 'name' => 'Wikidata',
448 448
                 'notice' => "Label for language <em>$lang</em> is missing", // FIXME: i18n
449
-                'explanation' => "See: <a target='_blank' " .
449
+                'explanation' => "See: <a target='_blank' ".
450 450
                     "href='//www.wikidata.org/wiki/Help:Label'>Help:Label</a>",
451 451
             ];
452 452
         }
@@ -455,7 +455,7 @@  discard block
 block discarded – undo
455 455
                 'prio' => 3,
456 456
                 'name' => 'Wikidata',
457 457
                 'notice' => "Description for language <em>$lang</em> is missing", // FIXME: i18n
458
-                'explanation' => "See: <a target='_blank' " .
458
+                'explanation' => "See: <a target='_blank' ".
459 459
                     "href='//www.wikidata.org/wiki/Help:Description'>Help:Description</a>",
460 460
             ];
461 461
         }
@@ -472,7 +472,7 @@  discard block
 block discarded – undo
472 472
         $query = "SELECT rev_id, rev_parent_id, rev_user_text, rev_user, rev_timestamp,
473 473
                   rev_minor_edit, rev_len, rev_comment
474 474
                   FROM $this->revisionTable
475
-                  WHERE rev_page = '" . $this->pageInfo['id'] . "' AND rev_timestamp > 1
475
+                  WHERE rev_page = '".$this->pageInfo['id']."' AND rev_timestamp > 1
476 476
                   ORDER BY rev_timestamp";
477 477
 
478 478
         $res = $this->conn->query($query)->fetchAll();
@@ -492,14 +492,14 @@  discard block
 block discarded – undo
492 492
             return $rev['rev_len'];
493 493
         }
494 494
 
495
-        $lastRev = $this->pageHistory[$revIndex - 1];
495
+        $lastRev = $this->pageHistory[$revIndex-1];
496 496
 
497 497
         // TODO: Remove once T101631 is resolved
498 498
         // Treat as zero change in size if rev_len of previous edit is missing
499 499
         if ($lastRev['rev_len'] === null) {
500 500
             return 0;
501 501
         } else {
502
-            return $rev['rev_len'] - $lastRev['rev_len'];
502
+            return $rev['rev_len']-$lastRev['rev_len'];
503 503
         }
504 504
     }
505 505
 
@@ -520,12 +520,12 @@  discard block
 block discarded – undo
520 520
         // The month of the first edit. Used as a comparison when building the per-month data
521 521
         $firstEditMonth = strtotime(date('Y-m-01, 00:00', strtotime($firstEdit['rev_timestamp'])));
522 522
 
523
-        $lastEdit = $this->pageHistory[ $revisionCount - 1 ];
524
-        $secondLastEdit = $revisionCount === 1 ? $lastEdit : $this->pageHistory[ $revisionCount - 2 ];
523
+        $lastEdit = $this->pageHistory[$revisionCount-1];
524
+        $secondLastEdit = $revisionCount === 1 ? $lastEdit : $this->pageHistory[$revisionCount-2];
525 525
 
526 526
         // Now we can start our master array. This one will be HUGE!
527 527
         $lastEditSize = ($revisionCount > 1)
528
-            ? $lastEdit['rev_len'] - $secondLastEdit['rev_len']
528
+            ? $lastEdit['rev_len']-$secondLastEdit['rev_len']
529 529
             : $lastEdit['rev_len'];
530 530
         $data = [
531 531
             'general' => [
@@ -622,7 +622,7 @@  discard block
 block discarded – undo
622 622
             // Increment year and month counts for all edits
623 623
             $data['year_count'][$timestamp['year']]['all']++;
624 624
             $data['year_count'][$timestamp['year']]['months'][$timestamp['month']]['all']++;
625
-            $data['year_count'][$timestamp['year']]['size'] = (int) $rev['rev_len'];
625
+            $data['year_count'][$timestamp['year']]['size'] = (int)$rev['rev_len'];
626 626
 
627 627
             $editsThisMonth = $data['year_count'][$timestamp['year']]['months'][$timestamp['month']]['all'];
628 628
             if ($editsThisMonth > $data['max_edits_per_month']) {
@@ -666,9 +666,9 @@  discard block
 block discarded – undo
666 666
                 }
667 667
 
668 668
                 // determine if the next revision was a revert
669
-                $nextRevision = isset($this->pageHistory[$i + 1]) ? $this->pageHistory[$i + 1] : null;
669
+                $nextRevision = isset($this->pageHistory[$i+1]) ? $this->pageHistory[$i+1] : null;
670 670
                 $nextRevisionIsRevert = $nextRevision &&
671
-                    $this->getDiffSize($i + 1) === -$diffSize &&
671
+                    $this->getDiffSize($i+1) === -$diffSize &&
672 672
                     $this->aeh->isRevert($nextRevision['rev_comment']);
673 673
 
674 674
                 // don't count this edit as content removal if the next edit reverted it
Please login to merge, or discard this patch.
Unused Use Statements   -4 removed lines patch added patch discarded remove patch
@@ -6,11 +6,7 @@
 block discarded – undo
6 6
 use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route;
7 7
 use Symfony\Bundle\FrameworkBundle\Controller\Controller;
8 8
 use Symfony\Component\HttpFoundation\Request;
9
-use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
10 9
 use Symfony\Component\DependencyInjection\ContainerInterface;
11
-use AppBundle\Helper\Apihelper;
12
-use AppBundle\Helper\PageviewsHelper;
13
-use AppBundle\Helper\AutomatedEditsHelper;
14 10
 use Xtools\ProjectRepository;
15 11
 
16 12
 class ArticleInfoController extends Controller
Please login to merge, or discard this patch.
src/AppBundle/Controller/DefaultController.php 1 patch
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -4,7 +4,6 @@
 block discarded – undo
4 4
 
5 5
 use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route;
6 6
 use Symfony\Bundle\FrameworkBundle\Controller\Controller;
7
-use Symfony\Component\HttpFoundation\Request;
8 7
 use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
9 8
 
10 9
 class DefaultController extends Controller
Please login to merge, or discard this patch.
var/SymfonyRequirements.php 2 patches
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -223,7 +223,7 @@  discard block
 block discarded – undo
223 223
      * Adds a mandatory requirement in form of a php.ini configuration.
224 224
      *
225 225
      * @param string        $cfgName           The configuration name used for ini_get()
226
-     * @param bool|callback $evaluation        Either a boolean indicating whether the configuration should evaluate to true or false,
226
+     * @param boolean|string $evaluation        Either a boolean indicating whether the configuration should evaluate to true or false,
227 227
      *                                         or a callback function receiving the configuration value as parameter to determine the fulfillment of the requirement
228 228
      * @param bool          $approveCfgAbsence If true the Requirement will be fulfilled even if the configuration option does not exist, i.e. ini_get() returns false.
229 229
      *                                         This is helpful for abandoned configs in later PHP versions or configs of an optional extension, like Suhosin.
@@ -241,7 +241,7 @@  discard block
 block discarded – undo
241 241
      * Adds an optional recommendation in form of a php.ini configuration.
242 242
      *
243 243
      * @param string        $cfgName           The configuration name used for ini_get()
244
-     * @param bool|callback $evaluation        Either a boolean indicating whether the configuration should evaluate to true or false,
244
+     * @param string|false $evaluation        Either a boolean indicating whether the configuration should evaluate to true or false,
245 245
      *                                         or a callback function receiving the configuration value as parameter to determine the fulfillment of the requirement
246 246
      * @param bool          $approveCfgAbsence If true the Requirement will be fulfilled even if the configuration option does not exist, i.e. ini_get() returns false.
247 247
      *                                         This is helpful for abandoned configs in later PHP versions or configs of an optional extension, like Suhosin.
Please login to merge, or discard this patch.
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -49,11 +49,11 @@  discard block
 block discarded – undo
49 49
      */
50 50
     public function __construct($fulfilled, $testMessage, $helpHtml, $helpText = null, $optional = false)
51 51
     {
52
-        $this->fulfilled = (bool) $fulfilled;
53
-        $this->testMessage = (string) $testMessage;
54
-        $this->helpHtml = (string) $helpHtml;
55
-        $this->helpText = null === $helpText ? strip_tags($this->helpHtml) : (string) $helpText;
56
-        $this->optional = (bool) $optional;
52
+        $this->fulfilled = (bool)$fulfilled;
53
+        $this->testMessage = (string)$testMessage;
54
+        $this->helpHtml = (string)$helpHtml;
55
+        $this->helpText = null === $helpText ? strip_tags($this->helpHtml) : (string)$helpText;
56
+        $this->optional = (bool)$optional;
57 57
     }
58 58
 
59 59
     /**
@@ -544,7 +544,7 @@  discard block
 block discarded – undo
544 544
             );
545 545
         }
546 546
 
547
-        $pcreVersion = defined('PCRE_VERSION') ? (float) PCRE_VERSION : null;
547
+        $pcreVersion = defined('PCRE_VERSION') ? (float)PCRE_VERSION : null;
548 548
 
549 549
         $this->addRequirement(
550 550
             null !== $pcreVersion,
@@ -783,7 +783,7 @@  discard block
 block discarded – undo
783 783
         $unit = '';
784 784
         if (!ctype_digit($size)) {
785 785
             $unit = strtolower(substr($size, -1, 1));
786
-            $size = (int) substr($size, 0, -1);
786
+            $size = (int)substr($size, 0, -1);
787 787
         }
788 788
         switch ($unit) {
789 789
             case 'g':
@@ -793,7 +793,7 @@  discard block
 block discarded – undo
793 793
             case 'k':
794 794
                 return $size * 1024;
795 795
             default:
796
-                return (int) $size;
796
+                return (int)$size;
797 797
         }
798 798
     }
799 799
 
@@ -815,7 +815,7 @@  discard block
 block discarded – undo
815 815
                 continue;
816 816
             }
817 817
 
818
-            return (int) $package['version'][1] > 2 ? self::REQUIRED_PHP_VERSION : self::LEGACY_REQUIRED_PHP_VERSION;
818
+            return (int)$package['version'][1] > 2 ? self::REQUIRED_PHP_VERSION : self::LEGACY_REQUIRED_PHP_VERSION;
819 819
         }
820 820
 
821 821
         return false;
Please login to merge, or discard this patch.
web/app_dev.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -12,7 +12,7 @@
 block discarded – undo
12 12
 // Feel free to remove this, extend it, or make something more sophisticated.
13 13
 if (isset($_SERVER['HTTP_CLIENT_IP'])
14 14
     || isset($_SERVER['HTTP_X_FORWARDED_FOR'])
15
-    || !( in_array(@$_SERVER['REMOTE_ADDR'], [ '127.0.0.1', 'fe80::1', '::1' ]) || php_sapi_name() === 'cli-server' )
15
+    || !(in_array(@$_SERVER['REMOTE_ADDR'], ['127.0.0.1', 'fe80::1', '::1']) || php_sapi_name() === 'cli-server')
16 16
 ) {
17 17
     header('HTTP/1.0 403 Forbidden');
18 18
     exit('You are not allowed to access this file. Check '.basename(__FILE__).' for more information.');
Please login to merge, or discard this patch.
xtools_utilities/nonautomated_edits_parse.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -15,11 +15,11 @@
 block discarded – undo
15 15
 $data = json_decode($file, true);
16 16
 
17 17
 // Output the contents to the piped file
18
-print ( "parameters:
18
+print ("parameters:
19 19
   automated_tools:\r\n" );
20 20
 foreach ($data as $row) {
21
-    print "  - " . $row["name"] . ": '" . $row["regex"] . "'\r\n";
21
+    print "  - ".$row["name"].": '".$row["regex"]."'\r\n";
22 22
 }
23
-print ( "
23
+print ("
24 24
 
25
-  semi-automated edits source: $url" );
25
+  semi-automated edits source: $url");
Please login to merge, or discard this patch.
src/AppBundle/Helper/PageviewsHelper.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -12,8 +12,8 @@  discard block
 block discarded – undo
12 12
         $title = str_replace(' ', '_', $title);
13 13
         $client = new GuzzleHttp\Client();
14 14
 
15
-        $url = 'https://wikimedia.org/api/rest_v1/metrics/pageviews/per-article/' .
16
-            "$project/all-access/user/" . rawurlencode($title) . '/daily/' . $start . '/' . $end;
15
+        $url = 'https://wikimedia.org/api/rest_v1/metrics/pageviews/per-article/'.
16
+            "$project/all-access/user/".rawurlencode($title).'/daily/'.$start.'/'.$end;
17 17
 
18 18
         $res = $client->request('GET', $url);
19 19
         return json_decode($res->getBody()->getContents());
@@ -32,7 +32,7 @@  discard block
 block discarded – undo
32 32
         $data = $this->getLastDays($project, $title, $days);
33 33
 
34 34
         // FIXME: needs to handle gotchas
35
-        return array_sum(array_map(function ($item) {
35
+        return array_sum(array_map(function($item) {
36 36
             return $item->views;
37 37
         }, $data->items));
38 38
     }
Please login to merge, or discard this patch.
src/AppBundle/Twig/Extension.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -45,7 +45,7 @@
 block discarded – undo
45 45
         }
46 46
 
47 47
         // Find the path, and complain if English doesn't exist.
48
-        $path = $this->container->getParameter("kernel.root_dir") . '/../i18n';
48
+        $path = $this->container->getParameter("kernel.root_dir").'/../i18n';
49 49
         if (!file_exists("$path/en.json")) {
50 50
             throw new Exception("Language directory doesn't exist: $path");
51 51
         }
Please login to merge, or discard this patch.
src/AppBundle/Twig/WikiExtension.php 2 patches
Doc Comments   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -72,7 +72,6 @@  discard block
 block discarded – undo
72 72
 
73 73
     /**
74 74
      * Get a link to the given user's userpage, or to Special:Contribs if $username is an IP
75
-     * @param  string $username   Username
76 75
      * @param  string $projectUrl Project domain and protocol such as https://en.wikipedia.org
77 76
      * @param  string [$label]    The link text, defaults to $username
78 77
      * @return string Markup
@@ -176,7 +175,7 @@  discard block
 block discarded – undo
176 175
     /**
177 176
      * Get links to pageviews tools for the given page
178 177
      * @param  string $title      Title of page
179
-     * @param  string $projectUrl Project domain such as en.wikipedia.org
178
+     * @param  string $project Project domain such as en.wikipedia.org
180 179
      * @return string Markup
181 180
      */
182 181
     public function pageviewsLinks($title, $project)
Please login to merge, or discard this patch.
Spacing   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -14,25 +14,25 @@  discard block
 block discarded – undo
14 14
 
15 15
     public function intuitionMessage($message = "", $vars = [])
16 16
     {
17
-        return $this->getIntuition()->msg($message, [ "domain" => "xtools", "variables" => $vars ]);
17
+        return $this->getIntuition()->msg($message, ["domain" => "xtools", "variables" => $vars]);
18 18
     }
19 19
 
20 20
     /*********************************** FUNCTIONS ***********************************/
21 21
 
22 22
     public function getFunctions()
23 23
     {
24
-        $options = [ 'is_safe' => [ 'html']];
24
+        $options = ['is_safe' => ['html']];
25 25
         return [
26
-            new Twig_SimpleFunction('wiki_link', [ $this, 'wikiLink' ], $options),
27
-            new Twig_SimpleFunction('user_link', [ $this, 'userLink' ], $options),
28
-            new Twig_SimpleFunction('user_log_link', [ $this, 'userLogLink' ], $options),
29
-            new Twig_SimpleFunction('group_link', [ $this, 'groupLink' ], $options),
30
-            new Twig_SimpleFunction('wiki_history_link', [ $this, 'wikiHistoryLink' ], $options),
31
-            new Twig_SimpleFunction('wiki_log_link', [ $this, 'wikiLogLink' ], $options),
32
-            new Twig_SimpleFunction('pageviews_links', [ $this, 'pageviewsLinks' ], $options),
33
-            new Twig_SimpleFunction('diff_link', [ $this, 'diffLink' ], $options),
34
-            new Twig_SimpleFunction('perma_link', [ $this, 'permaLink' ], $options),
35
-            new Twig_SimpleFunction('edit_link', [ $this, 'editLink' ], $options),
26
+            new Twig_SimpleFunction('wiki_link', [$this, 'wikiLink'], $options),
27
+            new Twig_SimpleFunction('user_link', [$this, 'userLink'], $options),
28
+            new Twig_SimpleFunction('user_log_link', [$this, 'userLogLink'], $options),
29
+            new Twig_SimpleFunction('group_link', [$this, 'groupLink'], $options),
30
+            new Twig_SimpleFunction('wiki_history_link', [$this, 'wikiHistoryLink'], $options),
31
+            new Twig_SimpleFunction('wiki_log_link', [$this, 'wikiLogLink'], $options),
32
+            new Twig_SimpleFunction('pageviews_links', [$this, 'pageviewsLinks'], $options),
33
+            new Twig_SimpleFunction('diff_link', [$this, 'diffLink'], $options),
34
+            new Twig_SimpleFunction('perma_link', [$this, 'permaLink'], $options),
35
+            new Twig_SimpleFunction('edit_link', [$this, 'editLink'], $options),
36 36
         ];
37 37
     }
38 38
 
@@ -244,8 +244,8 @@  discard block
 block discarded – undo
244 244
     public function getFilters()
245 245
     {
246 246
         return [
247
-            new \Twig_SimpleFilter('diff_format', [ $this, 'diffFormat' ], [ 'is_safe' => [ 'html' ] ]),
248
-            new \Twig_SimpleFilter('wikify_comment', [ $this, 'wikifyComment' ], [ 'is_safe' => [ 'html' ] ]),
247
+            new \Twig_SimpleFilter('diff_format', [$this, 'diffFormat'], ['is_safe' => ['html']]),
248
+            new \Twig_SimpleFilter('wikify_comment', [$this, 'wikifyComment'], ['is_safe' => ['html']]),
249 249
         ];
250 250
     }
251 251
 
@@ -284,7 +284,7 @@  discard block
 block discarded – undo
284 284
         if ($isSection) {
285 285
             $sectionTitle = $sectionMatch[1][0];
286 286
             $sectionTitleLink = str_replace(' ', '_', $sectionTitle);
287
-            $sectionWikitext = "<a target='_blank' href='$projectUrl/wiki/$title#$sectionTitleLink'>&rarr;</a>" .
287
+            $sectionWikitext = "<a target='_blank' href='$projectUrl/wiki/$title#$sectionTitleLink'>&rarr;</a>".
288 288
                 "<em class='text-muted'>$sectionTitle:</em> ";
289 289
             $wikitext = str_replace($sectionMatch[0][0], $sectionWikitext, $wikitext);
290 290
         }
Please login to merge, or discard this patch.
src/AppBundle/Controller/AdminStatsController.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -176,7 +176,7 @@
 block discarded – undo
176 176
 
177 177
         // Iterate over query results, loading each user id into the array
178 178
         while ($row = $res->fetch()) {
179
-            $adminIdArr[] = $row["user_id"] ;
179
+            $adminIdArr[] = $row["user_id"];
180 180
         }
181 181
 
182 182
         // Set the query results to be useful in a sql statement.
Please login to merge, or discard this patch.