mirror of
https://github.com/phpbb/phpbb.git
synced 2025-08-01 14:30:32 +02:00
[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
This commit is contained in:
@@ -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;
|
||||
|
Reference in New Issue
Block a user