/**
* Array for background color values
*/
- private $backgroundColor = array(
+ private $backgroundColor = [
'red' => 0,
'green' => 0,
'blue' => 0
- );
+ ];
/**
* Array for foreground color values
*/
- private $foregroundColor = array(
+ private $foregroundColor = [
'red' => 0,
'green' => 0,
'blue' => 0
- );
+ ];
/**
* All image strings
* @param $imageType Type of the image
* @return $helperInstance A preparedf instance of this helper
*/
- public static final function createImageHelper (CompileableTemplate $templateInstance, $imageType) {
+ public static final function createImageHelper (CompileableTemplate $templateInstance, string $imageType) {
// Get new instance
$helperInstance = new ImageHelper();
*
* @param $stringName String name (identifier)
*/
- public function addTextLine ($stringName) {
+ public function addTextLine (string $stringName) {
// Create the image string
$this->imageStrings[$stringName] = array(
'x' => '',
* @param $imageString A message to display in image
* @return void
*/
- public final function setImageString ($imageString) {
- $this->imageStrings[$this->currString]['string'] = (string) $imageString;
+ public final function setImageString (string $imageString) {
+ $this->imageStrings[$this->currString]['string'] = $imageString;
}
/**
* @param $y Y coordinate
* @return void
*/
- public final function setCoord ($x, $y) {
- $this->imageStrings[$this->currString]['x'] = (int) $x;
- $this->imageStrings[$this->currString]['y'] = (int) $y;
+ public final function setCoord (int $x, int $y) {
+ $this->imageStrings[$this->currString]['x'] = $x;
+ $this->imageStrings[$this->currString]['y'] = $y;
}
/**