@@ -12,7 +12,7 @@ |
||
| 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.'); |
@@ -15,11 +15,11 @@ |
||
| 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"); |
|
@@ -27,9 +27,9 @@ discard block |
||
| 27 | 27 | $username = $request->query->get('user'); |
| 28 | 28 | |
| 29 | 29 | if ($projectQuery != "" && $username != "") { |
| 30 | - return $this->redirectToRoute("AdminScoreResult", [ 'project'=>$projectQuery, 'username' => $username ]); |
|
| 30 | + return $this->redirectToRoute("AdminScoreResult", ['project'=>$projectQuery, 'username' => $username]); |
|
| 31 | 31 | } elseif ($projectQuery != "") { |
| 32 | - return $this->redirectToRoute("AdminScoreProject", [ 'project'=>$projectQuery ]); |
|
| 32 | + return $this->redirectToRoute("AdminScoreProject", ['project'=>$projectQuery]); |
|
| 33 | 33 | } |
| 34 | 34 | |
| 35 | 35 | // Otherwise fall through. |
@@ -67,20 +67,20 @@ discard block |
||
| 67 | 67 | $archiveTable = $lh->getTable("archive", $dbName); |
| 68 | 68 | |
| 69 | 69 | // MULTIPLIERS (to review) |
| 70 | - $ACCT_AGE_MULT = 1.25; # 0 if = 365 jours |
|
| 71 | - $EDIT_COUNT_MULT = 1.25; # 0 if = 10 000 |
|
| 72 | - $USER_PAGE_MULT = 0.1; # 0 if = |
|
| 70 | + $ACCT_AGE_MULT = 1.25; # 0 if = 365 jours |
|
| 71 | + $EDIT_COUNT_MULT = 1.25; # 0 if = 10 000 |
|
| 72 | + $USER_PAGE_MULT = 0.1; # 0 if = |
|
| 73 | 73 | $PATROLS_MULT = 1; # 0 if = |
| 74 | - $BLOCKS_MULT = 1.4; # 0 if = 10 |
|
| 74 | + $BLOCKS_MULT = 1.4; # 0 if = 10 |
|
| 75 | 75 | $AFD_MULT = 1.15; |
| 76 | - $RECENT_ACTIVITY_MULT = 0.9; # 0 if = |
|
| 76 | + $RECENT_ACTIVITY_MULT = 0.9; # 0 if = |
|
| 77 | 77 | $AIV_MULT = 1.15; |
| 78 | - $EDIT_SUMMARIES_MULT = 0.8; # 0 if = |
|
| 79 | - $NAMESPACES_MULT = 1.0; # 0 if = |
|
| 78 | + $EDIT_SUMMARIES_MULT = 0.8; # 0 if = |
|
| 79 | + $NAMESPACES_MULT = 1.0; # 0 if = |
|
| 80 | 80 | $PAGES_CREATED_LIVE_MULT = 1.4; # 0 if = |
| 81 | 81 | $PAGES_CREATED_ARCHIVE_MULT = 1.4; # 0 if = |
| 82 | - $RPP_MULT = 1.15; # 0 if = |
|
| 83 | - $USERRIGHTS_MULT = 0.75; # 0 if = |
|
| 82 | + $RPP_MULT = 1.15; # 0 if = |
|
| 83 | + $USERRIGHTS_MULT = 0.75; # 0 if = |
|
| 84 | 84 | |
| 85 | 85 | // Grab the connection to the replica database (which is separate from the above) |
| 86 | 86 | $conn = $this->get('doctrine')->getManager("replicas")->getConnection(); |
@@ -154,15 +154,15 @@ discard block |
||
| 154 | 154 | $now = new DateTime(); |
| 155 | 155 | $date = new DateTime($value); |
| 156 | 156 | $diff = $date->diff($now); |
| 157 | - $formula = 365*$diff->format("%y")+30*$diff->format("%m")+$diff->format("%d"); |
|
| 157 | + $formula = 365 * $diff->format("%y")+30 * $diff->format("%m")+$diff->format("%d"); |
|
| 158 | 158 | $value = $formula-365; |
| 159 | 159 | } |
| 160 | 160 | |
| 161 | 161 | if ($key == "id") { |
| 162 | 162 | $id = $value; |
| 163 | 163 | } else { |
| 164 | - $multiplierKey = strtoupper($row["source"] . "_MULT"); |
|
| 165 | - $multiplier = ( isset($$multiplierKey) ? $$multiplierKey : 1 ); |
|
| 164 | + $multiplierKey = strtoupper($row["source"]."_MULT"); |
|
| 165 | + $multiplier = (isset($$multiplierKey) ? $$multiplierKey : 1); |
|
| 166 | 166 | $score = max(min($value * $multiplier, 100), -100); |
| 167 | 167 | $master[$key]["mult"] = $multiplier; |
| 168 | 168 | $master[$key]["value"] = $value; |
@@ -172,8 +172,8 @@ discard block |
||
| 172 | 172 | } |
| 173 | 173 | |
| 174 | 174 | if ($id == 0) { |
| 175 | - $this->addFlash("notice", [ "noresult", $username ]); |
|
| 176 | - return $this->redirectToRoute("AdminScore", [ "project"=>$project ]); |
|
| 175 | + $this->addFlash("notice", ["noresult", $username]); |
|
| 176 | + return $this->redirectToRoute("AdminScore", ["project"=>$project]); |
|
| 177 | 177 | } |
| 178 | 178 | |
| 179 | 179 | // replace this example code with whatever you need |
@@ -31,10 +31,10 @@ discard block |
||
| 31 | 31 | $username = $request->query->get('user'); |
| 32 | 32 | |
| 33 | 33 | if ($projectQuery != "" && $username != "") { |
| 34 | - $routeParams = [ 'project'=>$projectQuery, 'username' => $username ]; |
|
| 34 | + $routeParams = ['project'=>$projectQuery, 'username' => $username]; |
|
| 35 | 35 | return $this->redirectToRoute("SimpleEditCounterResult", $routeParams); |
| 36 | 36 | } elseif ($projectQuery != "") { |
| 37 | - return $this->redirectToRoute("SimpleEditCounterProject", [ 'project'=>$projectQuery ]); |
|
| 37 | + return $this->redirectToRoute("SimpleEditCounterProject", ['project'=>$projectQuery]); |
|
| 38 | 38 | } |
| 39 | 39 | |
| 40 | 40 | // Otherwise fall through. |
@@ -89,8 +89,8 @@ discard block |
||
| 89 | 89 | $resultQuery->execute(); |
| 90 | 90 | |
| 91 | 91 | if ($resultQuery->errorCode() > 0) { |
| 92 | - $this->addFlash("notice", [ "noresult", $username ]); |
|
| 93 | - return $this->redirectToRoute("SimpleEditCounterProject", [ "project"=>$project ]); |
|
| 92 | + $this->addFlash("notice", ["noresult", $username]); |
|
| 93 | + return $this->redirectToRoute("SimpleEditCounterProject", ["project"=>$project]); |
|
| 94 | 94 | } |
| 95 | 95 | |
| 96 | 96 | // Fetch the result data |
@@ -114,16 +114,16 @@ discard block |
||
| 114 | 114 | $rev = $row["value"]; |
| 115 | 115 | } |
| 116 | 116 | if ($row["source"] == "groups") { |
| 117 | - $groups .= $row["value"]. ", "; |
|
| 117 | + $groups .= $row["value"].", "; |
|
| 118 | 118 | } |
| 119 | 119 | } |
| 120 | 120 | |
| 121 | 121 | // Unknown user - If the user is created the $results variable will have 3 entries. |
| 122 | 122 | // This is a workaround to detect non-existent IPs. |
| 123 | 123 | if (count($results) < 3 && $arch == 0 && $rev == 0) { |
| 124 | - $this->addFlash('notice', [ "noresult", $username ]); |
|
| 124 | + $this->addFlash('notice', ["noresult", $username]); |
|
| 125 | 125 | |
| 126 | - return $this->redirectToRoute("SimpleEditCounterProject", [ "project"=>$project ]); |
|
| 126 | + return $this->redirectToRoute("SimpleEditCounterProject", ["project"=>$project]); |
|
| 127 | 127 | } |
| 128 | 128 | |
| 129 | 129 | // Remove the last comma and space |
@@ -152,7 +152,7 @@ discard block |
||
| 152 | 152 | 'project_url' => $url, |
| 153 | 153 | 'id' => $id, |
| 154 | 154 | 'arch' => $arch, |
| 155 | - 'rev' => $rev + $arch, |
|
| 155 | + 'rev' => $rev+$arch, |
|
| 156 | 156 | 'live' => $rev, |
| 157 | 157 | 'groups' => $groups, |
| 158 | 158 | 'globalGroups' => $globalGroups, |
@@ -12,8 +12,8 @@ discard block |
||
| 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 |
||
| 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 | } |
@@ -45,7 +45,7 @@ |
||
| 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 | } |
@@ -49,11 +49,11 @@ discard block |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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; |
@@ -176,7 +176,7 @@ |
||
| 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. |
@@ -16,39 +16,39 @@ discard block |
||
| 16 | 16 | { |
| 17 | 17 | $options = ['is_safe' => ['html']]; |
| 18 | 18 | return [ |
| 19 | - new \Twig_SimpleFunction('request_time', [ $this, 'requestTime' ], $options), |
|
| 20 | - new \Twig_SimpleFunction('memory_usage', [ $this, 'requestMemory' ], $options), |
|
| 21 | - new \Twig_SimpleFunction('year', [ $this, 'generateYear' ], $options), |
|
| 22 | - new \Twig_SimpleFunction('linkWiki', [ $this, 'linkToWiki' ], $options), |
|
| 23 | - new \Twig_SimpleFunction('linkWikiScript', [ $this, 'linkToWikiScript' ], $options), |
|
| 24 | - new \Twig_SimpleFunction('msgPrintExists', [ $this, 'intuitionMessagePrintExists' ], $options), |
|
| 25 | - new \Twig_SimpleFunction('msgExists', [ $this, 'intuitionMessageExists' ], $options), |
|
| 26 | - new \Twig_SimpleFunction('msg', [ $this, 'intuitionMessage' ], $options), |
|
| 27 | - new \Twig_SimpleFunction('msg_footer', [ $this, 'intuitionMessageFooter' ], $options), |
|
| 28 | - new \Twig_SimpleFunction('lang', [ $this, 'getLang' ], $options), |
|
| 29 | - new \Twig_SimpleFunction('langName', [ $this, 'getLangName' ], $options), |
|
| 30 | - new \Twig_SimpleFunction('allLangs', [ $this, 'getAllLangs' ]), |
|
| 31 | - new \Twig_SimpleFunction('isRTL', [ $this, 'intuitionIsRTL' ]), |
|
| 32 | - new \Twig_SimpleFunction('isRTLLang', [ $this, 'intuitionIsRTLLang' ]), |
|
| 33 | - new \Twig_SimpleFunction('shortHash', [ $this, 'gitShortHash' ]), |
|
| 34 | - new \Twig_SimpleFunction('hash', [ $this, 'gitHash' ]), |
|
| 35 | - new \Twig_SimpleFunction('enabled', [ $this, 'tabEnabled' ]), |
|
| 36 | - new \Twig_SimpleFunction('tools', [ $this, 'allTools' ]), |
|
| 37 | - new \Twig_SimpleFunction('color', [ $this, 'getColorList' ]), |
|
| 38 | - new \Twig_SimpleFunction('isWMFLabs', [ $this, 'isWMFLabs' ]), |
|
| 39 | - new \Twig_SimpleFunction('isSingleWiki', [ $this, 'isSingleWiki' ]), |
|
| 40 | - new \Twig_SimpleFunction('getReplagThreshold', [ $this, 'getReplagThreshold' ]), |
|
| 41 | - new \Twig_SimpleFunction('loadStylesheetsFromCDN', [ $this, 'loadStylesheetsFromCDN' ]), |
|
| 42 | - new \Twig_SimpleFunction('isWMFLabs', [ $this, 'isWMFLabs' ]), |
|
| 43 | - new \Twig_SimpleFunction('replag', [ $this, 'replag' ]), |
|
| 44 | - new \Twig_SimpleFunction('link', [ $this, 'link' ]), |
|
| 19 | + new \Twig_SimpleFunction('request_time', [$this, 'requestTime'], $options), |
|
| 20 | + new \Twig_SimpleFunction('memory_usage', [$this, 'requestMemory'], $options), |
|
| 21 | + new \Twig_SimpleFunction('year', [$this, 'generateYear'], $options), |
|
| 22 | + new \Twig_SimpleFunction('linkWiki', [$this, 'linkToWiki'], $options), |
|
| 23 | + new \Twig_SimpleFunction('linkWikiScript', [$this, 'linkToWikiScript'], $options), |
|
| 24 | + new \Twig_SimpleFunction('msgPrintExists', [$this, 'intuitionMessagePrintExists'], $options), |
|
| 25 | + new \Twig_SimpleFunction('msgExists', [$this, 'intuitionMessageExists'], $options), |
|
| 26 | + new \Twig_SimpleFunction('msg', [$this, 'intuitionMessage'], $options), |
|
| 27 | + new \Twig_SimpleFunction('msg_footer', [$this, 'intuitionMessageFooter'], $options), |
|
| 28 | + new \Twig_SimpleFunction('lang', [$this, 'getLang'], $options), |
|
| 29 | + new \Twig_SimpleFunction('langName', [$this, 'getLangName'], $options), |
|
| 30 | + new \Twig_SimpleFunction('allLangs', [$this, 'getAllLangs']), |
|
| 31 | + new \Twig_SimpleFunction('isRTL', [$this, 'intuitionIsRTL']), |
|
| 32 | + new \Twig_SimpleFunction('isRTLLang', [$this, 'intuitionIsRTLLang']), |
|
| 33 | + new \Twig_SimpleFunction('shortHash', [$this, 'gitShortHash']), |
|
| 34 | + new \Twig_SimpleFunction('hash', [$this, 'gitHash']), |
|
| 35 | + new \Twig_SimpleFunction('enabled', [$this, 'tabEnabled']), |
|
| 36 | + new \Twig_SimpleFunction('tools', [$this, 'allTools']), |
|
| 37 | + new \Twig_SimpleFunction('color', [$this, 'getColorList']), |
|
| 38 | + new \Twig_SimpleFunction('isWMFLabs', [$this, 'isWMFLabs']), |
|
| 39 | + new \Twig_SimpleFunction('isSingleWiki', [$this, 'isSingleWiki']), |
|
| 40 | + new \Twig_SimpleFunction('getReplagThreshold', [$this, 'getReplagThreshold']), |
|
| 41 | + new \Twig_SimpleFunction('loadStylesheetsFromCDN', [$this, 'loadStylesheetsFromCDN']), |
|
| 42 | + new \Twig_SimpleFunction('isWMFLabs', [$this, 'isWMFLabs']), |
|
| 43 | + new \Twig_SimpleFunction('replag', [$this, 'replag']), |
|
| 44 | + new \Twig_SimpleFunction('link', [$this, 'link']), |
|
| 45 | 45 | ]; |
| 46 | 46 | } |
| 47 | 47 | |
| 48 | 48 | public function requestTime($decimals = 3) |
| 49 | 49 | { |
| 50 | 50 | |
| 51 | - return number_format(microtime(true) - $_SERVER['REQUEST_TIME_FLOAT'], $decimals); |
|
| 51 | + return number_format(microtime(true)-$_SERVER['REQUEST_TIME_FLOAT'], $decimals); |
|
| 52 | 52 | } |
| 53 | 53 | |
| 54 | 54 | public function requestMemory() |
@@ -74,7 +74,7 @@ discard block |
||
| 74 | 74 | */ |
| 75 | 75 | public function linkToWiki($url, $page, $secondary = "") |
| 76 | 76 | { |
| 77 | - $link = $url . "/"; |
|
| 77 | + $link = $url."/"; |
|
| 78 | 78 | |
| 79 | 79 | if ($this->isWMFLabs()) { |
| 80 | 80 | $link .= "wiki/"; |
@@ -91,7 +91,7 @@ discard block |
||
| 91 | 91 | |
| 92 | 92 | public function linkToWikiScript($url, $secondary) |
| 93 | 93 | { |
| 94 | - $link = $url . "/"; |
|
| 94 | + $link = $url."/"; |
|
| 95 | 95 | |
| 96 | 96 | if ($this->isWMFLabs()) { |
| 97 | 97 | $link .= "w/"; |
@@ -107,7 +107,7 @@ discard block |
||
| 107 | 107 | // TODO: refactor all intuition stuff so it can be used anywhere |
| 108 | 108 | public function intuitionMessageExists($message = "") |
| 109 | 109 | { |
| 110 | - return $this->getIntuition()->msgExists($message, [ "domain" => "xtools" ]); |
|
| 110 | + return $this->getIntuition()->msgExists($message, ["domain" => "xtools"]); |
|
| 111 | 111 | } |
| 112 | 112 | |
| 113 | 113 | public function intuitionMessagePrintExists($message = "", $vars = []) |
@@ -126,7 +126,7 @@ discard block |
||
| 126 | 126 | |
| 127 | 127 | public function intuitionMessage($message = "", $vars = []) |
| 128 | 128 | { |
| 129 | - return $this->getIntuition()->msg($message, [ "domain" => "xtools", "variables" => $vars ]); |
|
| 129 | + return $this->getIntuition()->msg($message, ["domain" => "xtools", "variables" => $vars]); |
|
| 130 | 130 | } |
| 131 | 131 | |
| 132 | 132 | public function intuitionMessageFooter() |
@@ -154,10 +154,10 @@ discard block |
||
| 154 | 154 | */ |
| 155 | 155 | public function getAllLangs() |
| 156 | 156 | { |
| 157 | - $messageFiles = glob($this->container->getParameter("kernel.root_dir") . '/../i18n/*.json'); |
|
| 157 | + $messageFiles = glob($this->container->getParameter("kernel.root_dir").'/../i18n/*.json'); |
|
| 158 | 158 | |
| 159 | 159 | $languages = array_values(array_unique(array_map( |
| 160 | - function ($filename) { |
|
| 160 | + function($filename) { |
|
| 161 | 161 | return basename($filename, '.json'); |
| 162 | 162 | }, |
| 163 | 163 | $messageFiles |
@@ -214,41 +214,41 @@ discard block |
||
| 214 | 214 | public static function getColorList($num = false) |
| 215 | 215 | { |
| 216 | 216 | $colors = [ |
| 217 | - 0 => '#Cc0000',# '#FF005A', #red '#FF5555', |
|
| 217 | + 0 => '#Cc0000', # '#FF005A', #red '#FF5555', |
|
| 218 | 218 | 1 => '#F7b7b7', |
| 219 | - 2 => '#5c8d20',# '#008800', #green'#55FF55', |
|
| 219 | + 2 => '#5c8d20', # '#008800', #green'#55FF55', |
|
| 220 | 220 | 3 => '#85eD82', |
| 221 | 221 | 4 => '#2E97E0', # blue |
| 222 | 222 | 5 => '#B9E3F9', |
| 223 | - 6 => '#e1711d', # orange |
|
| 223 | + 6 => '#e1711d', # orange |
|
| 224 | 224 | 7 => '#ffc04c', |
| 225 | 225 | 8 => '#FDFF98', # yellow |
| 226 | 226 | 9 => '#5555FF', |
| 227 | 227 | 10 => '#55FFFF', |
| 228 | - 11 => '#0000C0', # |
|
| 229 | - 12 => '#008800', # green |
|
| 228 | + 11 => '#0000C0', # |
|
| 229 | + 12 => '#008800', # green |
|
| 230 | 230 | 13 => '#00C0C0', |
| 231 | - 14 => '#FFAFAF', # rosé |
|
| 232 | - 15 => '#808080', # gray |
|
| 231 | + 14 => '#FFAFAF', # rosé |
|
| 232 | + 15 => '#808080', # gray |
|
| 233 | 233 | 16 => '#00C000', |
| 234 | 234 | 17 => '#404040', |
| 235 | - 18 => '#C0C000', # green |
|
| 235 | + 18 => '#C0C000', # green |
|
| 236 | 236 | 19 => '#C000C0', |
| 237 | - 100 => '#75A3D1', # blue |
|
| 238 | - 101 => '#A679D2', # purple |
|
| 237 | + 100 => '#75A3D1', # blue |
|
| 238 | + 101 => '#A679D2', # purple |
|
| 239 | 239 | 102 => '#660000', |
| 240 | 240 | 103 => '#000066', |
| 241 | - 104 => '#FAFFAF', # caramel |
|
| 241 | + 104 => '#FAFFAF', # caramel |
|
| 242 | 242 | 105 => '#408345', |
| 243 | 243 | 106 => '#5c8d20', |
| 244 | - 107 => '#e1711d', # red |
|
| 245 | - 108 => '#94ef2b', # light green |
|
| 246 | - 109 => '#756a4a', # brown |
|
| 244 | + 107 => '#e1711d', # red |
|
| 245 | + 108 => '#94ef2b', # light green |
|
| 246 | + 109 => '#756a4a', # brown |
|
| 247 | 247 | 110 => '#6f1dab', |
| 248 | 248 | 111 => '#301e30', |
| 249 | 249 | 112 => '#5c9d96', |
| 250 | - 113 => '#a8cd8c', # earth green |
|
| 251 | - 114 => '#f2b3f1', # light purple |
|
| 250 | + 113 => '#a8cd8c', # earth green |
|
| 251 | + 114 => '#f2b3f1', # light purple |
|
| 252 | 252 | 115 => '#9b5828', |
| 253 | 253 | 118 => '#99FFFF', |
| 254 | 254 | 119 => '#99BBFF', |
@@ -269,8 +269,8 @@ discard block |
||
| 269 | 269 | 446 => '#06DCFB', |
| 270 | 270 | 447 => '#892EE4', |
| 271 | 271 | 460 => '#99FF66', |
| 272 | - 461 => '#99CC66', # green |
|
| 273 | - 470 => '#CCCC33', # ocker |
|
| 272 | + 461 => '#99CC66', # green |
|
| 273 | + 470 => '#CCCC33', # ocker |
|
| 274 | 274 | 471 => '#CCFF33', |
| 275 | 275 | 480 => '#6699FF', |
| 276 | 276 | 481 => '#66FFFF', |
@@ -285,18 +285,18 @@ discard block |
||
| 285 | 285 | 1198 => '#FF34B3', |
| 286 | 286 | 1199 => '#8B1C62', |
| 287 | 287 | |
| 288 | - '#61a9f3',# blue |
|
| 289 | - '#f381b9',# pink |
|
| 288 | + '#61a9f3', # blue |
|
| 289 | + '#f381b9', # pink |
|
| 290 | 290 | '#61E3A9', |
| 291 | 291 | '#D56DE2', |
| 292 | 292 | '#85eD82', |
| 293 | 293 | '#F7b7b7', |
| 294 | 294 | '#CFDF49', |
| 295 | 295 | '#88d8f2', |
| 296 | - '#07AF7B',# green |
|
| 296 | + '#07AF7B', # green |
|
| 297 | 297 | '#B9E3F9', |
| 298 | 298 | '#FFF3AD', |
| 299 | - '#EF606A',# red |
|
| 299 | + '#EF606A', # red |
|
| 300 | 300 | '#EC8833', |
| 301 | 301 | '#FFF100', |
| 302 | 302 | '#87C9A5', |
@@ -413,7 +413,7 @@ discard block |
||
| 413 | 413 | public function getFilters() |
| 414 | 414 | { |
| 415 | 415 | return [ |
| 416 | - new \Twig_SimpleFilter('capitalize_first', [ $this, 'capitalizeFirst' ]), |
|
| 416 | + new \Twig_SimpleFilter('capitalize_first', [$this, 'capitalizeFirst']), |
|
| 417 | 417 | ]; |
| 418 | 418 | } |
| 419 | 419 | |