* @param $imageType Type of the image
* @return void
*/
- protected final function setImageType ($imageType) {
- $this->imageType = (string) $imageType;
+ protected final function setImageType (string $imageType) {
+ $this->imageType = $imageType;
}
/**
* @param $baseImage A base image template
* @return void
*/
- public final function setBaseImage ($baseImage) {
- $this->baseImage = (string) $baseImage;
+ public final function setBaseImage (string $baseImage) {
+ $this->baseImage = $baseImage;
}
/**
* @param $imageName Name of the image
* @return void
*/
- public final function setImageName ($imageName) {
- $this->imageName = (string) $imageName;
+ public final function setImageName (string $imageName) {
+ $this->imageName = $imageName;
}
/**
* @param $width Width of the image
* @return void
*/
- public final function setWidth ($width) {
- $this->width = (int) $width;
+ public final function setWidth (int $width) {
+ $this->width = $width;
}
/**
* @param $height Height of the image
* @return void
*/
- public final function setHeight ($height) {
- $this->height = (int) $height;
+ public final function setHeight (int $height) {
+ $this->height = $height;
}
/**
// Random numbers?
if ($red === 'rand') {
$red = $this->getRngInstance()->randomNumber(0, 255);
- } // END - if
+ }
if ($green === 'rand') {
$green = $this->getRngInstance()->randomNumber(0, 255);
- } // END - if
+ }
if ($blue === 'rand') {
$blue = $this->getRngInstance()->randomNumber(0, 255);
- } // END - if
+ }
$this->backgroundColor['red'] = (int) $red;
$this->backgroundColor['green'] = (int) $green;
// Random numbers?
if ($red === 'rand') {
$red = $this->getRngInstance()->randomNumber(0, 255);
- } // END - if
+ }
if ($green === 'rand') {
$green = $this->getRngInstance()->randomNumber(0, 255);
- } // END - if
+ }
if ($blue === 'rand') {
$blue = $this->getRngInstance()->randomNumber(0, 255);
- } // END - if
+ }
$this->foregroundColor['red'] = (int) $red;
$this->foregroundColor['green'] = (int) $green;
// Random font size?
if ($fontSize === 'rand') {
$fontSize = $this->getRngInstance()->randomNumber(4, 9);
- } // END - if
+ }
$this->imageStrings[$this->currString]['size'] = (int) $fontSize;
}
$templateInstance->addGroupVariable('image_y' , $this->getY());
$templateInstance->addGroupVariable('image_size' , $this->getFontSize());
$templateInstance->addGroupVariable('image_string', $this->getImageString());
- } // END - foreach
+ }
// Get the raw content
$imageContent = $templateInstance->getRawTemplateData();