Passed
Branch dbdriver-refactor (3762aa)
by MusikAnimal
04:48
created
src/AppBundle/Twig/AppExtension.php 1 patch
Spacing   +39 added lines, -39 removed lines patch added patch discarded remove patch
@@ -44,32 +44,32 @@  discard block
 block discarded – undo
44 44
     {
45 45
         $options = ['is_safe' => ['html']];
46 46
         return [
47
-            new \Twig_SimpleFunction('request_time', [ $this, 'requestTime' ], $options),
48
-            new \Twig_SimpleFunction('memory_usage', [ $this, 'requestMemory' ], $options),
49
-            new \Twig_SimpleFunction('year', [ $this, 'generateYear' ], $options),
50
-            new \Twig_SimpleFunction('msgPrintExists', [ $this, 'intuitionMessagePrintExists' ], $options),
51
-            new \Twig_SimpleFunction('msgExists', [ $this, 'intuitionMessageExists' ], $options),
52
-            new \Twig_SimpleFunction('msg', [ $this, 'intuitionMessage' ], $options),
53
-            new \Twig_SimpleFunction('lang', [ $this, 'getLang' ], $options),
54
-            new \Twig_SimpleFunction('langName', [ $this, 'getLangName' ], $options),
55
-            new \Twig_SimpleFunction('allLangs', [ $this, 'getAllLangs' ]),
56
-            new \Twig_SimpleFunction('isRTL', [ $this, 'intuitionIsRTL' ]),
57
-            new \Twig_SimpleFunction('isRTLLang', [ $this, 'intuitionIsRTLLang' ]),
58
-            new \Twig_SimpleFunction('shortHash', [ $this, 'gitShortHash' ]),
59
-            new \Twig_SimpleFunction('hash', [ $this, 'gitHash' ]),
60
-            new \Twig_SimpleFunction('releaseDate', [ $this, 'gitDate' ]),
61
-            new \Twig_SimpleFunction('enabled', [ $this, 'tabEnabled' ]),
62
-            new \Twig_SimpleFunction('tools', [ $this, 'allTools' ]),
63
-            new \Twig_SimpleFunction('color', [ $this, 'getColorList' ]),
64
-            new \Twig_SimpleFunction('chartColor', [ $this, 'chartColor' ]),
65
-            new \Twig_SimpleFunction('isSingleWiki', [ $this, 'isSingleWiki' ]),
66
-            new \Twig_SimpleFunction('getReplagThreshold', [ $this, 'getReplagThreshold' ]),
67
-            new \Twig_SimpleFunction('loadStylesheetsFromCDN', [ $this, 'loadStylesheetsFromCDN' ]),
68
-            new \Twig_SimpleFunction('isWMFLabs', [ $this, 'isWMFLabs' ]),
69
-            new \Twig_SimpleFunction('replag', [ $this, 'replag' ]),
70
-            new \Twig_SimpleFunction('link', [ $this, 'link' ]),
71
-            new \Twig_SimpleFunction('quote', [ $this, 'quote' ]),
72
-            new \Twig_SimpleFunction('bugReportURL', [ $this, 'bugReportURL' ]),
47
+            new \Twig_SimpleFunction('request_time', [$this, 'requestTime'], $options),
48
+            new \Twig_SimpleFunction('memory_usage', [$this, 'requestMemory'], $options),
49
+            new \Twig_SimpleFunction('year', [$this, 'generateYear'], $options),
50
+            new \Twig_SimpleFunction('msgPrintExists', [$this, 'intuitionMessagePrintExists'], $options),
51
+            new \Twig_SimpleFunction('msgExists', [$this, 'intuitionMessageExists'], $options),
52
+            new \Twig_SimpleFunction('msg', [$this, 'intuitionMessage'], $options),
53
+            new \Twig_SimpleFunction('lang', [$this, 'getLang'], $options),
54
+            new \Twig_SimpleFunction('langName', [$this, 'getLangName'], $options),
55
+            new \Twig_SimpleFunction('allLangs', [$this, 'getAllLangs']),
56
+            new \Twig_SimpleFunction('isRTL', [$this, 'intuitionIsRTL']),
57
+            new \Twig_SimpleFunction('isRTLLang', [$this, 'intuitionIsRTLLang']),
58
+            new \Twig_SimpleFunction('shortHash', [$this, 'gitShortHash']),
59
+            new \Twig_SimpleFunction('hash', [$this, 'gitHash']),
60
+            new \Twig_SimpleFunction('releaseDate', [$this, 'gitDate']),
61
+            new \Twig_SimpleFunction('enabled', [$this, 'tabEnabled']),
62
+            new \Twig_SimpleFunction('tools', [$this, 'allTools']),
63
+            new \Twig_SimpleFunction('color', [$this, 'getColorList']),
64
+            new \Twig_SimpleFunction('chartColor', [$this, 'chartColor']),
65
+            new \Twig_SimpleFunction('isSingleWiki', [$this, 'isSingleWiki']),
66
+            new \Twig_SimpleFunction('getReplagThreshold', [$this, 'getReplagThreshold']),
67
+            new \Twig_SimpleFunction('loadStylesheetsFromCDN', [$this, 'loadStylesheetsFromCDN']),
68
+            new \Twig_SimpleFunction('isWMFLabs', [$this, 'isWMFLabs']),
69
+            new \Twig_SimpleFunction('replag', [$this, 'replag']),
70
+            new \Twig_SimpleFunction('link', [$this, 'link']),
71
+            new \Twig_SimpleFunction('quote', [$this, 'quote']),
72
+            new \Twig_SimpleFunction('bugReportURL', [$this, 'bugReportURL']),
73 73
             new \Twig_SimpleFunction('logged_in_user', [$this, 'functionLoggedInUser']),
74 74
             new \Twig_SimpleFunction('isUserAnon', [$this, 'isUserAnon']),
75 75
             new \Twig_SimpleFunction('nsName', [$this, 'nsName']),
@@ -88,7 +88,7 @@  discard block
 block discarded – undo
88 88
     public function requestTime()
89 89
     {
90 90
         if (!isset($this->requestTime)) {
91
-            $this->requestTime = microtime(true) - $this->getCurrentRequest()->server->get('REQUEST_TIME_FLOAT');
91
+            $this->requestTime = microtime(true)-$this->getCurrentRequest()->server->get('REQUEST_TIME_FLOAT');
92 92
         }
93 93
 
94 94
         return $this->requestTime;
@@ -162,7 +162,7 @@  discard block
 block discarded – undo
162 162
     public function intuitionMessage($message = "", $vars = [])
163 163
     {
164 164
         $vars = is_array($vars) ? $vars : [];
165
-        return $this->getIntuition()->msg($message, [ "domain" => "xtools", "variables" => $vars ]);
165
+        return $this->getIntuition()->msg($message, ["domain" => "xtools", "variables" => $vars]);
166 166
     }
167 167
 
168 168
     /**
@@ -191,10 +191,10 @@  discard block
 block discarded – undo
191 191
      */
192 192
     public function getAllLangs()
193 193
     {
194
-        $messageFiles = glob($this->container->getParameter("kernel.root_dir") . '/../i18n/*.json');
194
+        $messageFiles = glob($this->container->getParameter("kernel.root_dir").'/../i18n/*.json');
195 195
 
196 196
         $languages = array_values(array_unique(array_map(
197
-            function ($filename) {
197
+            function($filename) {
198 198
                 return basename($filename, '.json');
199 199
             },
200 200
             $messageFiles
@@ -542,9 +542,9 @@  discard block
 block discarded – undo
542 542
     public function getFilters()
543 543
     {
544 544
         return [
545
-            new \Twig_SimpleFilter('capitalize_first', [ $this, 'capitalizeFirst' ]),
546
-            new \Twig_SimpleFilter('percent_format', [ $this, 'percentFormat' ]),
547
-            new \Twig_SimpleFilter('diff_format', [ $this, 'diffFormat' ], [ 'is_safe' => [ 'html' ] ]),
545
+            new \Twig_SimpleFilter('capitalize_first', [$this, 'capitalizeFirst']),
546
+            new \Twig_SimpleFilter('percent_format', [$this, 'percentFormat']),
547
+            new \Twig_SimpleFilter('diff_format', [$this, 'diffFormat'], ['is_safe' => ['html']]),
548 548
             new \Twig_SimpleFilter('num_format', [$this, 'numberFormat']),
549 549
             new \Twig_SimpleFilter('date_format', [$this, 'dateFormatStd']),
550 550
             new \Twig_SimpleFilter('date_localize', [$this, 'dateFormat']),
@@ -633,10 +633,10 @@  discard block
 block discarded – undo
633 633
         if (!$denominator) {
634 634
             $quotient = $numerator;
635 635
         } else {
636
-            $quotient = ( $numerator / $denominator ) * 100;
636
+            $quotient = ($numerator / $denominator) * 100;
637 637
         }
638 638
 
639
-        return $this->numberFormat($quotient, $precision) . '%';
639
+        return $this->numberFormat($quotient, $precision).'%';
640 640
     }
641 641
 
642 642
     /**
@@ -706,7 +706,7 @@  discard block
 block discarded – undo
706 706
         list($val, $key) = $this->getDurationMessageKey($seconds);
707 707
 
708 708
         if ($translate) {
709
-            return $this->numberFormat($val) . ' ' . $this->intuitionMessage("num-$key", [$val]);
709
+            return $this->numberFormat($val).' '.$this->intuitionMessage("num-$key", [$val]);
710 710
         } else {
711 711
             return [$this->numberFormat($val), "num-$key"];
712 712
         }
@@ -727,15 +727,15 @@  discard block
 block discarded – undo
727 727
 
728 728
         if ($seconds >= 86400) {
729 729
             // Over a day
730
-            $val = (int) floor($seconds / 86400);
730
+            $val = (int)floor($seconds / 86400);
731 731
             $key = 'days';
732 732
         } elseif ($seconds >= 3600) {
733 733
             // Over an hour, less than a day
734
-            $val = (int) floor($seconds / 3600);
734
+            $val = (int)floor($seconds / 3600);
735 735
             $key = 'hours';
736 736
         } elseif ($seconds >= 60) {
737 737
             // Over a minute, less than an hour
738
-            $val = (int) floor($seconds / 60);
738
+            $val = (int)floor($seconds / 60);
739 739
             $key = 'minutes';
740 740
         }
741 741
 
Please login to merge, or discard this patch.
src/Xtools/ArticleInfoRepository.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -29,7 +29,7 @@  discard block
 block discarded – undo
29 29
         $datesConditions = $this->getDateConditions($start, $end);
30 30
 
31 31
         $sql = "SELECT COUNT(DISTINCT(rev_id)) AS count, rev_user_text AS username, ug_group AS current
32
-                FROM " . $project->getTableName('revision') . "
32
+                FROM " . $project->getTableName('revision')."
33 33
                 LEFT JOIN $userGroupsTable ON rev_user = ug_user
34 34
                 LEFT JOIN $userFormerGroupsTable ON rev_user = ufg_user
35 35
                 WHERE rev_page = :pageId AND (ug_group = 'bot' OR ufg_group = 'bot') $datesConditions
@@ -56,7 +56,7 @@  discard block
 block discarded – undo
56 56
 
57 57
         $sql = "SELECT log_action, log_type, log_timestamp AS 'timestamp'
58 58
                 FROM $loggingTable
59
-                WHERE log_namespace = '" . $page->getNamespace() . "'
59
+                WHERE log_namespace = '".$page->getNamespace()."'
60 60
                 AND log_title = :title AND log_timestamp > 1 $datesConditions
61 61
                 AND log_type IN ('delete', 'move', 'protect', 'stable')";
62 62
         $title = str_replace(' ', '_', $page->getTitle());
@@ -79,7 +79,7 @@  discard block
 block discarded – undo
79 79
 
80 80
         $projectLang = $page->getProject()->getLang();
81 81
 
82
-        $url = "https://api.wikiwho.net/$projectLang/api/v1.0.0-beta/rev_content/" .
82
+        $url = "https://api.wikiwho.net/$projectLang/api/v1.0.0-beta/rev_content/".
83 83
             "$title/?o_rev_id=false&editor=true&token_id=false&out=false&in=false";
84 84
 
85 85
         $res = $client->request('GET', $url, ['http_errors' => false]);
Please login to merge, or discard this patch.
src/AppBundle/Controller/EditCounterController.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -135,7 +135,7 @@
 block discarded – undo
135 135
         }
136 136
 
137 137
         $ret = [
138
-            'xtTitle' => $this->user->getUsername() . ' - ' . $this->project->getTitle(),
138
+            'xtTitle' => $this->user->getUsername().' - '.$this->project->getTitle(),
139 139
             'xtPage' => 'ec',
140 140
             'user' => $this->user,
141 141
             'project' => $this->project,
Please login to merge, or discard this patch.
src/Xtools/Project.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -127,7 +127,7 @@  discard block
 block discarded – undo
127 127
      */
128 128
     public function getUrl($withTrailingSlash = true)
129 129
     {
130
-        return rtrim($this->getBasicInfo()['url'], '/') . ($withTrailingSlash ? '/' : '');
130
+        return rtrim($this->getBasicInfo()['url'], '/').($withTrailingSlash ? '/' : '');
131 131
     }
132 132
 
133 133
     /**
@@ -184,7 +184,7 @@  discard block
 block discarded – undo
184 184
         $metadata = $this->getMetadata();
185 185
         return isset($metadata['general']['script'])
186 186
             ? $metadata['general']['script']
187
-            : $this->getScriptPath() . '/index.php';
187
+            : $this->getScriptPath().'/index.php';
188 188
     }
189 189
 
190 190
     /**
@@ -194,7 +194,7 @@  discard block
 block discarded – undo
194 194
      */
195 195
     public function getApiUrl()
196 196
     {
197
-        return rtrim($this->getUrl(), '/') . $this->getRepository()->getApiPath();
197
+        return rtrim($this->getUrl(), '/').$this->getRepository()->getApiPath();
198 198
     }
199 199
 
200 200
     /**
@@ -258,7 +258,7 @@  discard block
 block discarded – undo
258 258
      */
259 259
     public function userOptInPage(User $user)
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
 block discarded – undo
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()
@@ -312,7 +312,7 @@  discard block
 block discarded – undo
312 312
      */
313 313
     public function hasPageAssessments()
314 314
     {
315
-        return (bool) $this->getRepository()->getAssessmentsConfig($this->getDomain());
315
+        return (bool)$this->getRepository()->getAssessmentsConfig($this->getDomain());
316 316
     }
317 317
 
318 318
     /**
@@ -326,9 +326,9 @@  discard block
 block discarded – undo
326 326
         $config = $this->getRepository()->getAssessmentsConfig($this->getDomain());
327 327
 
328 328
         if (isset($config['class'][$class])) {
329
-            $url = "https://upload.wikimedia.org/wikipedia/commons/" . $config['class'][$class]['badge'];
329
+            $url = "https://upload.wikimedia.org/wikipedia/commons/".$config['class'][$class]['badge'];
330 330
         } elseif (isset($config['class']['Unknown'])) {
331
-            $url = "https://upload.wikimedia.org/wikipedia/commons/" . $config['class']['Unknown']['badge'];
331
+            $url = "https://upload.wikimedia.org/wikipedia/commons/".$config['class']['Unknown']['badge'];
332 332
         } else {
333 333
             $url = "";
334 334
         }
Please login to merge, or discard this patch.
src/AppBundle/EventSubscriber/RateLimitSubscriber.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -56,8 +56,8 @@  discard block
 block discarded – undo
56 56
      */
57 57
     public function onKernelController(FilterControllerEvent $event)
58 58
     {
59
-        $this->rateLimit = (int) $this->container->getParameter('app.rate_limit_count');
60
-        $this->rateDuration = (int) $this->container->getParameter('app.rate_limit_time');
59
+        $this->rateLimit = (int)$this->container->getParameter('app.rate_limit_count');
60
+        $this->rateDuration = (int)$this->container->getParameter('app.rate_limit_time');
61 61
 
62 62
         // Zero values indicate the rate limiting feature should be disabled.
63 63
         if ($this->rateLimit === 0 || $this->rateDuration === 0) {
@@ -65,7 +65,7 @@  discard block
 block discarded – undo
65 65
         }
66 66
 
67 67
         $controller = $event->getController();
68
-        $loggedIn = (bool) $this->container->get('session')->get('logged_in_user');
68
+        $loggedIn = (bool)$this->container->get('session')->get('logged_in_user');
69 69
 
70 70
         /**
71 71
          * Rate limiting will not apply to these actions
@@ -91,7 +91,7 @@  discard block
 block discarded – undo
91 91
         $cacheItem = $cache->getItem($cacheKey);
92 92
 
93 93
         // If increment value already in cache, or start with 1.
94
-        $count = $cacheItem->isHit() ? (int) $cacheItem->get() + 1 : 1;
94
+        $count = $cacheItem->isHit() ? (int)$cacheItem->get()+1 : 1;
95 95
 
96 96
         // Check if limit has been exceeded, and if so, throw an error.
97 97
         if ($count > $this->rateLimit) {
@@ -143,9 +143,9 @@  discard block
 block discarded – undo
143 143
         // Log the denied request
144 144
         $logger = $this->container->get('monolog.logger.rate_limit');
145 145
         $logger->info(
146
-            "<URI>: " . $request->getRequestUri() .
147
-            ($logComment != '' ? "\t<Reason>: $logComment" : '') .
148
-            "\t<User agent>: " . $request->headers->get('User-Agent')
146
+            "<URI>: ".$request->getRequestUri().
147
+            ($logComment != '' ? "\t<Reason>: $logComment" : '').
148
+            "\t<User agent>: ".$request->headers->get('User-Agent')
149 149
         );
150 150
 
151 151
         throw new TooManyRequestsHttpException(600, 'error-rate-limit', null, $this->rateDuration);
Please login to merge, or discard this patch.
src/Xtools/PageRepository.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -151,7 +151,7 @@  discard block
 block discarded – undo
151 151
         // supply as the OFFSET.
152 152
         $limitClause = '';
153 153
         if (intval($limit) > 0 && isset($numRevisions)) {
154
-            $offset = $numRevisions - $limit;
154
+            $offset = $numRevisions-$limit;
155 155
             $limitClause = "LIMIT $offset, $limit";
156 156
         }
157 157
 
@@ -290,7 +290,7 @@  discard block
 block discarded – undo
290 290
         $time2 = time();
291 291
 
292 292
         // If it took over 5 seconds, cache the result for 20 minutes.
293
-        if ($time2 - $time1 > 5) {
293
+        if ($time2-$time1 > 5) {
294 294
             $this->setCache($cacheKey, $result, 'PT20M');
295 295
         }
296 296
 
@@ -409,7 +409,7 @@  discard block
 block discarded – undo
409 409
 
410 410
         $wikidataId = ltrim($page->getWikidataId(), 'Q');
411 411
 
412
-        $sql = "SELECT " . ($count ? 'COUNT(*) AS count' : '*') . "
412
+        $sql = "SELECT ".($count ? 'COUNT(*) AS count' : '*')."
413 413
                 FROM wikidatawiki_p.wb_items_per_site
414 414
                 WHERE ips_item_id = :wikidataId";
415 415
 
@@ -417,7 +417,7 @@  discard block
 block discarded – undo
417 417
             'wikidataId' => $wikidataId,
418 418
         ])->fetchAll();
419 419
 
420
-        return $count ? (int) $result[0]['count'] : $result;
420
+        return $count ? (int)$result[0]['count'] : $result;
421 421
     }
422 422
 
423 423
     /**
@@ -455,7 +455,7 @@  discard block
 block discarded – undo
455 455
 
456 456
         // Transform to associative array by 'type'
457 457
         foreach ($res as $row) {
458
-            $data[$row['type'] . '_count'] = $row['value'];
458
+            $data[$row['type'].'_count'] = $row['value'];
459 459
         }
460 460
 
461 461
         return $data;
@@ -497,7 +497,7 @@  discard block
 block discarded – undo
497 497
 
498 498
         $project = $page->getProject()->getDomain();
499 499
 
500
-        $url = 'https://wikimedia.org/api/rest_v1/metrics/pageviews/per-article/' .
500
+        $url = 'https://wikimedia.org/api/rest_v1/metrics/pageviews/per-article/'.
501 501
             "$project/all-access/user/$title/daily/$start/$end";
502 502
 
503 503
         $res = $client->request('GET', $url);
Please login to merge, or discard this patch.
src/Xtools/EditCounterRepository.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -126,10 +126,10 @@  discard block
 block discarded – undo
126 126
         ])->fetchAll();
127 127
 
128 128
         $logCounts = array_combine(
129
-            array_map(function ($e) {
129
+            array_map(function($e) {
130 130
                 return $e['source'];
131 131
             }, $results),
132
-            array_map(function ($e) {
132
+            array_map(function($e) {
133 133
                 return $e['value'];
134 134
             }, $results)
135 135
         );
@@ -367,9 +367,9 @@  discard block
 block discarded – undo
367 367
             'id' => $user->getId($project),
368 368
         ])->fetchAll();
369 369
 
370
-        $namespaceTotals = array_combine(array_map(function ($e) {
370
+        $namespaceTotals = array_combine(array_map(function($e) {
371 371
             return $e['page_namespace'];
372
-        }, $results), array_map(function ($e) {
372
+        }, $results), array_map(function($e) {
373 373
             return $e['total'];
374 374
         }, $results));
375 375
 
@@ -423,7 +423,7 @@  discard block
 block discarded – undo
423 423
             }
424 424
             $queries[] = $sql;
425 425
         }
426
-        $sql = "(\n" . join("\n) UNION (\n", $queries) . ")\n";
426
+        $sql = "(\n".join("\n) UNION (\n", $queries).")\n";
427 427
 
428 428
         $revisions = $this->executeProjectsQuery($sql, [
429 429
             'username' => $user->getUsername(),
Please login to merge, or discard this patch.
src/Xtools/AutoEditsRepository.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -52,7 +52,7 @@  discard block
 block discarded – undo
52 52
             $tagJoin = $tags != '' ? "LEFT OUTER JOIN $tagTable ON ct_rev_id = rev_id" : '';
53 53
             $condTools[] = "ct_tag IN ($tags)";
54 54
         }
55
-        $condTool = 'AND (' . implode(' OR ', $condTools) . ')';
55
+        $condTool = 'AND ('.implode(' OR ', $condTools).')';
56 56
 
57 57
         $sql = "SELECT COUNT(DISTINCT(rev_id))
58 58
                 FROM $revisionTable
@@ -65,7 +65,7 @@  discard block
 block discarded – undo
65 65
                 $condEnd";
66 66
 
67 67
         $resultQuery = $this->executeQuery($sql, $user, $namespace, $start, $end);
68
-        $result = (int) $resultQuery->fetchColumn();
68
+        $result = (int)$resultQuery->fetchColumn();
69 69
 
70 70
         // Cache and return.
71 71
         $this->stopwatch->stop($cacheKey);
@@ -190,8 +190,8 @@  discard block
 block discarded – undo
190 190
         }
191 191
 
192 192
         // Sort the array by count
193
-        uasort($results, function ($a, $b) {
194
-            return $b['count'] - $a['count'];
193
+        uasort($results, function($a, $b) {
194
+            return $b['count']-$a['count'];
195 195
         });
196 196
 
197 197
         // Cache and return.
@@ -233,7 +233,7 @@  discard block
 block discarded – undo
233 233
 
234 234
             // Developer error, no regex or tag provided for this tool.
235 235
             if ($condTool === '') {
236
-                throw new Exception("No regex or tag found for the tool $toolname. " .
236
+                throw new Exception("No regex or tag found for the tool $toolname. ".
237 237
                     "Please verify this entry in semi_automated.yml");
238 238
             }
239 239
 
@@ -279,7 +279,7 @@  discard block
 block discarded – undo
279 279
             if ($condTool === '') {
280 280
                 $condTool = "ct_tag = $tag";
281 281
             } else {
282
-                $condTool = '(' . $condTool . " OR ct_tag = $tag)";
282
+                $condTool = '('.$condTool." OR ct_tag = $tag)";
283 283
             }
284 284
         }
285 285
 
Please login to merge, or discard this patch.