]> 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 1353efc2e8acb51730b611398dfe4a39b9e7063d..a1ef9add7b824ba0be86309d0c6ee55e21fcfebd 100644 (file)
@@ -123,8 +123,8 @@ class ImageHelper extends BaseCaptcha implements HelpableTemplate {
         * @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;
        }
 
        /**
@@ -142,8 +142,8 @@ class ImageHelper extends BaseCaptcha implements HelpableTemplate {
         * @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;
        }
 
        /**
@@ -161,8 +161,8 @@ class ImageHelper extends BaseCaptcha implements HelpableTemplate {
         * @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;
        }
 
        /**
@@ -180,8 +180,8 @@ class ImageHelper extends BaseCaptcha implements HelpableTemplate {
         * @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;
        }
 
        /**
@@ -199,8 +199,8 @@ class ImageHelper extends BaseCaptcha implements HelpableTemplate {
         * @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;
        }
 
        /**
@@ -224,13 +224,13 @@ class ImageHelper extends BaseCaptcha implements HelpableTemplate {
                // 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;
@@ -249,13 +249,13 @@ class ImageHelper extends BaseCaptcha implements HelpableTemplate {
                // 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;
@@ -339,7 +339,7 @@ class ImageHelper extends BaseCaptcha implements HelpableTemplate {
                // Random font size?
                if ($fontSize === 'rand') {
                        $fontSize = $this->getRngInstance()->randomNumber(4, 9);
-               } // END - if
+               }
 
                $this->imageStrings[$this->currString]['size'] = (int) $fontSize;
        }
@@ -390,7 +390,7 @@ class ImageHelper extends BaseCaptcha implements HelpableTemplate {
                        $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();