diff options
author | Andreas Fischer <bantu@phpbb.com> | 2014-04-29 17:51:21 +0200 |
---|---|---|
committer | Andreas Fischer <bantu@phpbb.com> | 2014-04-29 17:51:21 +0200 |
commit | 89391dec089e8085f486b768ad7654f62166f4a2 (patch) | |
tree | 32132483f24f6aaf760794b3a4d3b5723351fadf /phpBB/includes/captcha/captcha_gd.php | |
parent | 40351fae96de34312ca960abc5048c835f50e3ef (diff) | |
download | forums-89391dec089e8085f486b768ad7654f62166f4a2.tar forums-89391dec089e8085f486b768ad7654f62166f4a2.tar.gz forums-89391dec089e8085f486b768ad7654f62166f4a2.tar.bz2 forums-89391dec089e8085f486b768ad7654f62166f4a2.tar.xz forums-89391dec089e8085f486b768ad7654f62166f4a2.zip |
[ticket/12458] Apply Squiz.WhiteSpace.SuperfluousWhitespace.* to legacy code.
* There MUST NOT be trailing whitespace at the end of lines.
* There MUST NOT be whitespace before the first content of a file.
* There MUST NOT be whitespace after the last content of a file.
* Functions MUST NOT contain multiple empty lines in a row.
PHPBB3-12458
Diffstat (limited to 'phpBB/includes/captcha/captcha_gd.php')
-rw-r--r-- | phpBB/includes/captcha/captcha_gd.php | 21 |
1 files changed, 10 insertions, 11 deletions
diff --git a/phpBB/includes/captcha/captcha_gd.php b/phpBB/includes/captcha/captcha_gd.php index 3a82457c4a..e7c01c040a 100644 --- a/phpBB/includes/captcha/captcha_gd.php +++ b/phpBB/includes/captcha/captcha_gd.php @@ -32,7 +32,7 @@ class captcha function execute($code, $seed) { global $config; - + mt_srand($seed); // Create image @@ -160,13 +160,13 @@ class captcha function wave($img) { global $config; - + $period_x = mt_rand(12,18); $period_y = mt_rand(7,14); $amp_x = mt_rand(5,10); - $amp_y = mt_rand(2,4); + $amp_y = mt_rand(2,4); $socket = mt_rand(0,100); - + $dampen_x = mt_rand($this->width/5, $this->width/2); $dampen_y = mt_rand($this->height/5, $this->height/2); $direction_x = (mt_rand (0, 1)); @@ -185,7 +185,7 @@ class captcha } return $img; } - + /** * Noise line */ @@ -236,7 +236,7 @@ class captcha } function captcha_noise_bg_bitmaps() - { + { return array( 'width' => 15, 'height' => 5, @@ -300,7 +300,7 @@ class captcha function captcha_bitmaps() { global $config; - + $chars = array( 'A' => array( array( @@ -1681,7 +1681,7 @@ class captcha 'J' => $chars['J'][mt_rand(0, min(sizeof($chars['J']), $config['captcha_gd_fonts']) -1)], 'K' => $chars['K'][mt_rand(0, min(sizeof($chars['K']), $config['captcha_gd_fonts']) -1)], 'L' => $chars['L'][mt_rand(0, min(sizeof($chars['L']), $config['captcha_gd_fonts']) -1)], - 'M' => $chars['M'][mt_rand(0, min(sizeof($chars['M']), $config['captcha_gd_fonts']) -1)], + 'M' => $chars['M'][mt_rand(0, min(sizeof($chars['M']), $config['captcha_gd_fonts']) -1)], 'N' => $chars['N'][mt_rand(0, min(sizeof($chars['N']), $config['captcha_gd_fonts']) -1)], 'O' => $chars['O'][mt_rand(0, min(sizeof($chars['O']), $config['captcha_gd_fonts']) -1)], 'P' => $chars['P'][mt_rand(0, min(sizeof($chars['P']), $config['captcha_gd_fonts']) -1)], @@ -2196,7 +2196,7 @@ class colour_manager { $mode = $this->mode; } - + if (!is_array($colour)) { if (isset($this->named_rgb[$colour])) @@ -2352,7 +2352,6 @@ class colour_manager $colour3[0] += 180; $colour4[0] += 210; - $results[] = $this->allocate($colour2, $mode); $results[] = $this->allocate($colour3, $mode); $results[] = $this->allocate($colour4, $mode); @@ -2390,7 +2389,7 @@ class colour_manager } // This is a hard problem. I chicken out and try to maintain readability at the cost of less randomness. - + while ($count > 0) { $colour[1] = ($colour[1] + mt_rand(40,60)) % 99; |