@@ -107,8 +107,8 @@ discard block |
||
| 107 | 107 | $now = new DateTime(); |
| 108 | 108 | $date = new DateTime($value); |
| 109 | 109 | $diff = $date->diff($now); |
| 110 | - $formula = 365 * (int)$diff->format('%y') + 30 * |
|
| 111 | - (int)$diff->format('%m') + (int)$diff->format('%d'); |
|
| 110 | + $formula = 365 * (int)$diff->format('%y')+30 * |
|
| 111 | + (int)$diff->format('%m')+(int)$diff->format('%d'); |
|
| 112 | 112 | if ($formula < 365) { |
| 113 | 113 | $this->multipliers["account-age-mult"] = 0; |
| 114 | 114 | } |
@@ -116,7 +116,7 @@ discard block |
||
| 116 | 116 | } |
| 117 | 117 | } |
| 118 | 118 | |
| 119 | - $multiplierKey = $row['source'] . '-mult'; |
|
| 119 | + $multiplierKey = $row['source'].'-mult'; |
|
| 120 | 120 | $multiplier = isset($this->multipliers[$multiplierKey]) ? $this->multipliers[$multiplierKey] : 1; |
| 121 | 121 | $score = max(min($value * $multiplier, 100), -100); |
| 122 | 122 | $this->scores[$key]['mult'] = $multiplier; |
@@ -82,7 +82,7 @@ discard block |
||
| 82 | 82 | $tagJoin = $tags != '' ? "LEFT OUTER JOIN $tagTable ON ct_rev_id = rev_id" : ''; |
| 83 | 83 | $condTools[] = "ct_tag IN ($tags)"; |
| 84 | 84 | } |
| 85 | - $condTool = 'AND (' . implode(' OR ', $condTools) . ')'; |
|
| 85 | + $condTool = 'AND ('.implode(' OR ', $condTools).')'; |
|
| 86 | 86 | |
| 87 | 87 | $sql = "SELECT COUNT(DISTINCT(rev_id)) |
| 88 | 88 | FROM $revisionTable |
@@ -95,7 +95,7 @@ discard block |
||
| 95 | 95 | $condEnd"; |
| 96 | 96 | |
| 97 | 97 | $resultQuery = $this->executeQuery($sql, $user, $namespace, $start, $end); |
| 98 | - $result = (int) $resultQuery->fetchColumn(); |
|
| 98 | + $result = (int)$resultQuery->fetchColumn(); |
|
| 99 | 99 | |
| 100 | 100 | // Cache and return. |
| 101 | 101 | return $this->setCache($cacheKey, $result); |
@@ -313,8 +313,8 @@ discard block |
||
| 313 | 313 | } |
| 314 | 314 | |
| 315 | 315 | // Sort the array by count |
| 316 | - uasort($results, function ($a, $b) { |
|
| 317 | - return $b['count'] - $a['count']; |
|
| 316 | + uasort($results, function($a, $b) { |
|
| 317 | + return $b['count']-$a['count']; |
|
| 318 | 318 | }); |
| 319 | 319 | |
| 320 | 320 | // Cache and return. |
@@ -354,7 +354,7 @@ discard block |
||
| 354 | 354 | |
| 355 | 355 | // Developer error, no regex or tag provided for this tool. |
| 356 | 356 | if ($condTool === '') { |
| 357 | - throw new Exception("No regex or tag found for the tool $toolname. " . |
|
| 357 | + throw new Exception("No regex or tag found for the tool $toolname. ". |
|
| 358 | 358 | "Please verify this entry in semi_automated.yml"); |
| 359 | 359 | } |
| 360 | 360 | |
@@ -411,7 +411,7 @@ discard block |
||
| 411 | 411 | if ($condTool === '') { |
| 412 | 412 | $condTool = $tagClause; |
| 413 | 413 | } else { |
| 414 | - $condTool = '(' . $condTool . " OR $tagClause)"; |
|
| 414 | + $condTool = '('.$condTool." OR $tagClause)"; |
|
| 415 | 415 | } |
| 416 | 416 | } |
| 417 | 417 | |