Skip to content

Commit

Permalink
changed coding style
Browse files Browse the repository at this point in the history
  • Loading branch information
didatus committed Mar 24, 2020
1 parent cb295bd commit 00904e1
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/Gregwar/Captcha/CaptchaBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ class CaptchaBuilder implements CaptchaBuilderInterface
/**
* @var array
*/
protected $lineColor = array();
protected $lineColor = null;

/**
* @var array
Expand Down Expand Up @@ -269,14 +269,14 @@ public function setBackgroundImages(array $backgroundImages)
*/
protected function drawLine($image, $width, $height, $tcol = null)
{
$red = $this->rand(100, 255);
$green = $this->rand(100, 255);
$blue = $this->rand(100, 255);

if (!empty($this->lineColor)) {
if ($this->lineColor === null) {
$red = $this->lineColor[0];
$green = $this->lineColor[1];
$blue = $this->lineColor[2];
} else {
$red = $this->rand(100, 255);
$green = $this->rand(100, 255);
$blue = $this->rand(100, 255);
}

if ($tcol === null) {
Expand Down

0 comments on commit 00904e1

Please sign in to comment.