]> git.mxchange.org Git - core.git/blobdiff - framework/main/classes/helper/captcha/images/class_ImageHelper.php
Continued:
[core.git] / framework / main / classes / helper / captcha / images / class_ImageHelper.php
index a1ef9add7b824ba0be86309d0c6ee55e21fcfebd..739c9777c29df5292ef82d35394cc393cbb0edd5 100644 (file)
@@ -53,20 +53,20 @@ class ImageHelper extends BaseCaptcha implements HelpableTemplate {
        /**
         * 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
@@ -100,7 +100,7 @@ class ImageHelper extends BaseCaptcha implements HelpableTemplate {
         * @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();
 
@@ -267,7 +267,7 @@ class ImageHelper extends BaseCaptcha implements HelpableTemplate {
         *
         * @param       $stringName             String name (identifier)
         */
-       public function addTextLine ($stringName) {
+       public function addTextLine (string $stringName) {
                // Create the image string
                $this->imageStrings[$stringName] = array(
                        'x'      => '',
@@ -286,8 +286,8 @@ class ImageHelper extends BaseCaptcha implements HelpableTemplate {
         * @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;
        }
 
        /**
@@ -306,9 +306,9 @@ class ImageHelper extends BaseCaptcha implements HelpableTemplate {
         * @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;
        }
 
        /**