]> git.mxchange.org Git - core.git/commitdiff
Continued:
authorRoland Häder <roland@mxchange.org>
Thu, 21 Aug 2025 23:28:02 +0000 (01:28 +0200)
committerRoland Häder <roland@mxchange.org>
Fri, 22 Aug 2025 00:03:52 +0000 (02:03 +0200)
- added some missing public methods to interface
- implemented them in decorator class
- added some more type-hints

25 files changed:
framework/main/classes/database/result/class_CachedDatabaseResult.php
framework/main/classes/decorator/xml/compactor/class_XmlCompactorDecorator.php
framework/main/classes/decorator/xml/template/class_XmlRewriterTemplateDecorator.php
framework/main/classes/file_directories/directory/class_FrameworkDirectoryPointer.php
framework/main/classes/filesystem/class_
framework/main/classes/helper/captcha/class_
framework/main/classes/helper/captcha/class_BaseCaptcha.php
framework/main/classes/helper/captcha/images/class_ImageHelper.php
framework/main/classes/helper/captcha/web/class_GraphicalCodeCaptcha.php
framework/main/classes/helper/class_
framework/main/classes/helper/class_BaseHelper.php
framework/main/classes/helper/html/blocks/class_HtmlBlockHelper.php
framework/main/classes/helper/html/class_
framework/main/classes/helper/html/forms/class_HtmlFormHelper.php
framework/main/classes/helper/html/links/class_HtmlLinkHelper.php
framework/main/classes/images/class_BaseImage.php
framework/main/classes/iterator/class_
framework/main/classes/iterator/default/class_DefaultIterator.php
framework/main/classes/iterator/file/class_FileIterator.php
framework/main/classes/iterator/registry/class_RegistryIterator.php
framework/main/classes/parser/xml/class_XmlParser.php
framework/main/classes/template/image/class_ImageTemplateEngine.php
framework/main/classes/template/xml/class_BaseXmlTemplateEngine.php
framework/main/interfaces/handler/class_HandleableDataSet.php
framework/main/interfaces/template/xml/class_CompileableXmlTemplate.php

index 14ddc5ee476c9b04ab5092c595ac8878d2a023c0..e6b9708163cb7884cf95ce6becaf8442b715a878 100644 (file)
@@ -529,9 +529,9 @@ class CachedDatabaseResult extends BaseDatabaseResult implements SearchableResul
        public function solveResultIndex (string $databaseColumn, DatabaseFrontend $frontendInstance, array $callback): void {
                // Check parameter
                //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->traceMessage(sprintf('CACHED-DATABASE-RESULT: databaseColumn=%s,frontendInstance=%s,callback()=%d - CALLED!', $databaseColumn, $frontendInstance->__toString(), count($callback)));
-               if (empty($key)) {
+               if (empty($databaseColumn)) {
                        // Throw IAE
-                       throw new InvalidArgumentException('Parameter "key" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
+                       throw new InvalidArgumentException('Parameter "databaseColumn" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
                } elseif (count($callback) != 2) {
                        // Throw it again
                        throw new InvalidArgumentException(sprintf('callback()=%d must be exactly 2', count($callback)), FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
index b293e574c11b841070103d97732fc2924b2f70ea..0c83b865b05f98b027f8f5ba2490e5a7d178da5f 100644 (file)
@@ -51,7 +51,7 @@ class XmlCompactorDecorator extends BaseDecorator implements Parseable {
         * @param       $innerParserInstance    A Parseable instance
         * @return      $parserInstance         An instance of this parser
         */
-       public static final function createXmlCompactorDecorator (Parseable $innerParserInstance) {
+       public static final function createXmlCompactorDecorator (Parseable $innerParserInstance): Parseable {
                // Get a new instance
                $parserInstance = new XmlCompactorDecorator();
 
@@ -74,7 +74,7 @@ class XmlCompactorDecorator extends BaseDecorator implements Parseable {
         * @param       $parserInstance An instance of an Parseable
         * @return      void
         */
-       protected final function setParserInstance (Parseable $parserInstance) {
+       protected final function setParserInstance (Parseable $parserInstance): void {
                $this->parserInstance = $parserInstance;
        }
 
@@ -83,7 +83,7 @@ class XmlCompactorDecorator extends BaseDecorator implements Parseable {
         *
         * @return      $parserInstance An instance of an Parseable
         */
-       private function getParserInstance () {
+       private function getParserInstance (): Parseable {
                return $this->parserInstance;
        }
 
index f0d606157d448fe66d5a1d292bd77cee94a879b0..b422dbf6af687498843cd81cc01010af9c6df16d 100644 (file)
@@ -449,8 +449,39 @@ class XmlRewriterTemplateDecorator extends BaseDecorator implements CompileableX
         * @return      void
         */
        public function assignMultipleVariables (array $variables): void {
-               // Call the inner class' method but trim the characters before
+               // Call the inner class' method
                $this->getTemplateInstance()->assignMultipleVariables($variables);
        }
 
+       /**
+        * Load a specified XML template into the engine
+        *
+        * @param       $templateName   Optional name of template
+        * @return      void
+        */
+       public function loadXmlTemplate (string $templateName = ''): void {
+               // Call the inner class' method
+               $this->getTemplateInstance()->loadXmlTemplate($templateName);
+       }
+
+       /**
+        * Getter for current main node
+        *
+        * @return      $currMainNode   Current main node
+        */
+       public function getCurrMainNode (): string {
+               // Call the inner class' method
+               return $this->getTemplateInstance()->getCurrMainNode();
+       }
+
+       /**
+        * Getter for main node array
+        *
+        * @return      $mainNodes      Array with valid main node names
+        */
+       public function getMainNodes (): array {
+               // Call the inner class' method
+               return $this->getTemplateInstance()->getMainNodes();
+       }
+
 }
index 7e628ccf1cb3ce6d75432d73089704958e5e2d5c..37f950988a258a8d31980aa9d11ef2a610b773f9 100644 (file)
@@ -224,7 +224,7 @@ class FrameworkDirectoryPointer extends BaseFrameworkSystem implements Framework
        /**
         * Checks if a DirectoryIterator instance is set
         *
-        * @return<>$isset<>Whether a DirectoryIterator instance is set
+        * @return      $isset  Whether a DirectoryIterator instance is set
         */
        public final function isDirectoryIteratorInstanceSet (): bool {
                return ($this->iteratorInstance instanceof DirectoryIterator);
index 7c51898fecec7bc48aa9f19c6e63018351eda8d7..2c5620e6bf96f734946062ed7eb32c3bd818a6b6 100644 (file)
@@ -38,7 +38,7 @@ class ???Filesystem extends BaseFilesystem implements Filesystem {
         * @param       $appInstance    A manageable application
         * @return      $///Instance    An instance of this Filesystem class
         */
-       public final static function create???Filesystem (ManageableApplication $appInstance) {
+       public final static function create???Filesystem (ManageableApplication $appInstance): Filesystem {
                // Get a new instance
                $///Instance = new ???Filesystem();
 
index 1e9e9da7d272def5061261f1a76ecefdc886eda1..5a1ba29243b68c5b89dc47586ea98e2052de0e69 100644 (file)
@@ -46,7 +46,7 @@ class ???Captcha extends BaseCaptcha implements SolveableCaptcha {
         * @param       $extraInstance          An extra instance, just for better hash data
         * @return      $captchaInstance        An instance of this captcha class
         */
-       public final static function create???Captcha (CompileableTemplate $templateInstance, FrameworkInterface $extraInstance = null) {
+       public final static function create???Captcha (CompileableTemplate $templateInstance, FrameworkInterface $extraInstance = null): SolveableCaptcha {
                // Get a new instance
                $captchaInstance = new ???Captcha();
 
@@ -66,7 +66,7 @@ class ???Captcha extends BaseCaptcha implements SolveableCaptcha {
         * @return      void
         * @todo        0% done
         */
-       public function initiateCaptcha () {
+       public function initiateCaptcha (): void {
                DebugMiddleware::getSelfInstance()->partialStub("Please implement this method.");
        }
 
@@ -76,7 +76,7 @@ class ???Captcha extends BaseCaptcha implements SolveableCaptcha {
         * @return      void
         * @todo        0% done
         */
-       public function renderCode () {
+       public function renderCode (): void {
                DebugMiddleware::getSelfInstance()->partialStub("Please implement this method.");
        }
 
index 93b5c13719c6b19e88d6e7aceaacf5e36fc0de62..8fc62058ee4a6447d77f1340431434cdff7d7f79 100644 (file)
@@ -55,7 +55,7 @@ abstract class BaseCaptcha extends BaseHelper implements Helper {
         * @param       $extraInstance  An extra instance, just for better hash data
         * @return      void
         */
-       protected final function initializeRandomNumberGenerator (FrameworkInterface $extraInstance = NULL) {
+       protected final function initializeRandomNumberGenerator (FrameworkInterface $extraInstance = NULL): void {
                // Get an RNG from factory
                $this->setRngInstance(ObjectFactory::createObjectByConfiguredName('rng_class', array($extraInstance)));
        }
index ca6e53f08efbcaf61fffbc4c7f63130dfd2adb2b..da3657ba8a13a30103a5872ffa88fc4f28e5582c 100644 (file)
@@ -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, string $imageType) {
+       public static final function createImageHelper (CompileableTemplate $templateInstance, string $imageType): HelpableTemplate {
                // Get new instance
                $helperInstance = new ImageHelper();
 
@@ -123,7 +123,7 @@ class ImageHelper extends BaseCaptcha implements HelpableTemplate {
         * @param       $imageType      Type of the image
         * @return      void
         */
-       protected final function setImageType (string $imageType) {
+       protected final function setImageType (string $imageType): void {
                $this->imageType = $imageType;
        }
 
@@ -132,7 +132,7 @@ class ImageHelper extends BaseCaptcha implements HelpableTemplate {
         *
         * @return      $imageType      Type of the image
         */
-       public final function getImageType () {
+       public final function getImageType (): string {
                return $this->imageType;
        }
 
@@ -142,7 +142,7 @@ class ImageHelper extends BaseCaptcha implements HelpableTemplate {
         * @param       $baseImage      A base image template
         * @return      void
         */
-       public final function setBaseImage (string $baseImage) {
+       public final function setBaseImage (string $baseImage): void {
                $this->baseImage = $baseImage;
        }
 
@@ -151,7 +151,7 @@ class ImageHelper extends BaseCaptcha implements HelpableTemplate {
         *
         * @return      $baseImage      A base image template
         */
-       public final function getBaseImage () {
+       public final function getBaseImage (): string {
                return $this->baseImage;
        }
 
@@ -161,7 +161,7 @@ class ImageHelper extends BaseCaptcha implements HelpableTemplate {
         * @param       $imageName      Name of the image
         * @return      void
         */
-       public final function setImageName (string $imageName) {
+       public final function setImageName (string $imageName): void {
                $this->imageName = $imageName;
        }
 
@@ -170,7 +170,7 @@ class ImageHelper extends BaseCaptcha implements HelpableTemplate {
         *
         * @return      $imageName      Name of the image
         */
-       protected final function getImageName () {
+       protected final function getImageName (): string {
                return $this->imageName;
        }
 
@@ -180,7 +180,7 @@ class ImageHelper extends BaseCaptcha implements HelpableTemplate {
         * @param       $width  Width of the image
         * @return      void
         */
-       public final function setWidth (int $width) {
+       public final function setWidth (int $width): void {
                $this->width = $width;
        }
 
@@ -189,7 +189,7 @@ class ImageHelper extends BaseCaptcha implements HelpableTemplate {
         *
         * @return      $width  Width of the image
         */
-       public final function getWidth () {
+       public final function getWidth (): int {
                return $this->width;
        }
 
@@ -199,7 +199,7 @@ class ImageHelper extends BaseCaptcha implements HelpableTemplate {
         * @param       $height         Height of the image
         * @return      void
         */
-       public final function setHeight (int $height) {
+       public final function setHeight (int $height): void {
                $this->height = $height;
        }
 
@@ -208,7 +208,7 @@ class ImageHelper extends BaseCaptcha implements HelpableTemplate {
         *
         * @return      $height         Height of the image
         */
-       public final function getHeight () {
+       public final function getHeight (): int {
                return $this->height;
        }
 
@@ -220,7 +220,7 @@ class ImageHelper extends BaseCaptcha implements HelpableTemplate {
         * @param       $blue   Color value for blue
         * @return      void
         */
-       public final function setBackgroundColorRedGreenBlue ($red, $green, $blue) {
+       public final function setBackgroundColorRedGreenBlue (mixed $red, mixed $green, mixed $blue): void {
                // Random numbers?
                if ($red === 'rand') {
                        $red = $this->getRngInstance()->randomNumber(0, 255);
@@ -245,7 +245,7 @@ class ImageHelper extends BaseCaptcha implements HelpableTemplate {
         * @param       $blue   Color value for blue
         * @return      void
         */
-       public final function setForegroundColorRedGreenBlue ($red, $green, $blue) {
+       public final function setForegroundColorRedGreenBlue (mixed $red, mixed $green, mixed $blue): void {
                // Random numbers?
                if ($red === 'rand') {
                        $red = $this->getRngInstance()->randomNumber(0, 255);
@@ -266,8 +266,9 @@ class ImageHelper extends BaseCaptcha implements HelpableTemplate {
         * Adds an image string to the buffer by the given string name
         *
         * @param       $stringName             String name (identifier)
+        * @return      void
         */
-       public function addTextLine (string $stringName) {
+       public function addTextLine (string $stringName): void {
                // Create the image string
                $this->imageStrings[$stringName] = array(
                        'x'      => '',
@@ -286,7 +287,7 @@ class ImageHelper extends BaseCaptcha implements HelpableTemplate {
         * @param       $imageString    A message to display in image
         * @return      void
         */
-       public final function setImageString (string $imageString) {
+       public final function setImageString (string $imageString): void {
                $this->imageStrings[$this->currString]['string'] = $imageString;
        }
 
@@ -295,7 +296,7 @@ class ImageHelper extends BaseCaptcha implements HelpableTemplate {
         *
         * @return      $imageString    A message to display in image
         */
-       public final function getImageString () {
+       public final function getImageString (): string {
                return $this->imageStrings[$this->currString]['string'];
        }
 
@@ -306,7 +307,7 @@ class ImageHelper extends BaseCaptcha implements HelpableTemplate {
         * @param       $y      Y coordinate
         * @return      void
         */
-       public final function setCoord (int $x, int $y) {
+       public final function setCoord (int $x, int $y): void {
                $this->imageStrings[$this->currString]['x'] = $x;
                $this->imageStrings[$this->currString]['y'] = $y;
        }
@@ -316,7 +317,7 @@ class ImageHelper extends BaseCaptcha implements HelpableTemplate {
         *
         * @return      $x      X coordinate
         */
-       public final function getX () {
+       public final function getX (): int {
                return $this->imageStrings[$this->currString]['x'];
        }
 
@@ -325,7 +326,7 @@ class ImageHelper extends BaseCaptcha implements HelpableTemplate {
         *
         * @return      $y      Y coordinate
         */
-       public final function getY () {
+       public final function getY (): int {
                return $this->imageStrings[$this->currString]['y'];
        }
 
@@ -335,7 +336,7 @@ class ImageHelper extends BaseCaptcha implements HelpableTemplate {
         * @param       $fontSize       Font size for strings
         * @return      void
         */
-       public final function setFontSize ($fontSize) {
+       public final function setFontSize (mixed $fontSize): void {
                // Random font size?
                if ($fontSize === 'rand') {
                        $fontSize = $this->getRngInstance()->randomNumber(4, 9);
@@ -349,7 +350,7 @@ class ImageHelper extends BaseCaptcha implements HelpableTemplate {
         *
         * @return      $fontSize       Font size for strings
         */
-       public final function getFontSize () {
+       public final function getFontSize (): mixed {
                return $this->imageStrings[$this->currString]['size'];
        }
 
@@ -358,7 +359,7 @@ class ImageHelper extends BaseCaptcha implements HelpableTemplate {
         *
         * @return      void
         */
-       public function flushContent () {
+       public function flushContent (): void {
                // Get a template instance
                $templateInstance = $this->getTemplateInstance();
 
index ade0e84ce94a8b44539f9d18e3752f920a99869c..d69d7edb054961f12f6feaf8013ca8a7dbf3c8a5 100644 (file)
@@ -59,7 +59,7 @@ class GraphicalCodeCaptcha extends BaseCaptcha implements SolveableCaptcha {
         * @param       $extraInstance          An extra instance, just for better hash data
         * @return      $captchaInstance        An instance of this captcha class
         */
-       public static final function createGraphicalCodeCaptcha (HelpableTemplate $helperInstance, FrameworkInterface $extraInstance = NULL) {
+       public static final function createGraphicalCodeCaptcha (HelpableTemplate $helperInstance, FrameworkInterface $extraInstance = NULL): SolveableCaptcha {
                // Get a new instance
                $captchaInstance = new GraphicalCodeCaptcha();
 
@@ -78,7 +78,7 @@ class GraphicalCodeCaptcha extends BaseCaptcha implements SolveableCaptcha {
         *
         * @return      void
         */
-       public function initiateCaptcha () {
+       public function initiateCaptcha (): void {
                // Get total length
                $captchaLength = FrameworkBootstrap::getConfigurationInstance()->getConfigEntry('captcha_string_length');
 
@@ -136,7 +136,7 @@ class GraphicalCodeCaptcha extends BaseCaptcha implements SolveableCaptcha {
         *
         * @return      void
         */
-       public function renderCode () {
+       public function renderCode (): void {
                // Get helper instance
                $helperInstance = $this->getHelperInstance();
 
index 5090e9d62be821bf19b79620675d9fecadcfd1d9..236cd246d234b6e422a56113e8cdfb5188dee780 100644 (file)
@@ -21,7 +21,7 @@
  * You should have received a copy of the GNU General Public License
  * along with this program. If not, see <http://www.gnu.org/licenses/>.
  */
-class ???Helper extends BaseHelper {
+class ???Helper extends BaseHelper implements Helper {
        /**
         * Protected constructor
         *
@@ -37,7 +37,7 @@ class ???Helper extends BaseHelper {
         *
         * @return      $helperInstance         A prepared instance of this helper
         */
-       public final static function create???Helper () {
+       public final static function create???Helper (): Helper  {
                // Get new instance
                $helperInstance = new ???Helper();
 
index b6545819801dc7d29d5b2cb98b9031e6597d2f38..393d138c13c08d38177666eb40f94af9516a3a06 100644 (file)
@@ -105,7 +105,7 @@ abstract class BaseHelper extends BaseFrameworkSystem {
         * @return      void
         * @throws      InvalidArgumentException        If a parameter has an invalid value
         */
-       protected final function addContent (string $newContent) {
+       protected final function addContent (string $newContent): void {
                // Check variable
                //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->traceMessage(sprintf('BASE-HELPER: newContent=%s - CALLED!', $newContent));
                if (empty(trim($newContent))) {
@@ -127,7 +127,7 @@ abstract class BaseHelper extends BaseFrameworkSystem {
         * @return      void
         * @throws      InvalidArgumentException        If a parameter has an invalid value
         */
-       protected function addHeaderContent (string $content) {
+       protected function addHeaderContent (string $content): void {
                // Check variable
                //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->traceMessage(sprintf('BASE-HELPER: content=%s - CALLED!', $content));
                if (empty(trim($content))) {
@@ -149,7 +149,7 @@ abstract class BaseHelper extends BaseFrameworkSystem {
         * @return      void
         * @throws      InvalidArgumentException        If a parameter has an invalid value
         */
-       protected function addFooterContent (string $content) {
+       protected function addFooterContent (string $content): void {
                // Check variable
                //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->traceMessage(sprintf('BASE-HELPER: content=%s - CALLED!', $content));
                if (empty(trim($content))) {
@@ -173,7 +173,7 @@ abstract class BaseHelper extends BaseFrameworkSystem {
         * @return      void
         * @throws      InvalidArgumentException        If a parameter has an invalid value
         */
-       protected final function addContentToPreviousGroup (string $newContent) {
+       protected final function addContentToPreviousGroup (string $newContent): void {
                // Check on parameter
                //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('BASE-HELPER: newContent=%s - CALLED!', $newContent));
                if (empty($newContent)) {
@@ -208,7 +208,7 @@ abstract class BaseHelper extends BaseFrameworkSystem {
         *
         * @return      $content        The rendered content by this helper
         */
-       protected final function getContent () {
+       protected final function getContent (): string {
                return $this->content;
        }
 
@@ -218,7 +218,7 @@ abstract class BaseHelper extends BaseFrameworkSystem {
         * @param       $extraInstance  An extra instance of FrameworkInterface to set
         * @return      void
         */
-       public final function setExtraInstance (FrameworkInterface $extraInstance) {
+       public final function setExtraInstance (FrameworkInterface $extraInstance): void {
                $this->extraInstance = $extraInstance;
        }
 
@@ -229,7 +229,7 @@ abstract class BaseHelper extends BaseFrameworkSystem {
         * @return      void
         * @throws      InvalidArgumentException        If a parameter has an invalid value
         */
-       public function assignField (string $fieldName) {
+       public function assignField (string $fieldName): void {
                // Check on parameter
                //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('BASE-HELPER: fieldName=%s - CALLED!', $fieldName));
                if (empty($fieldName)) {
@@ -257,7 +257,7 @@ abstract class BaseHelper extends BaseFrameworkSystem {
         * @throws      InvalidArgumentException        If a parameter has an invalid value
         * @todo        Rewrite this method using a helper class for filtering data
         */
-       public function assignFieldWithFilter (string $fieldName, string $filterMethod) {
+       public function assignFieldWithFilter (string $fieldName, string $filterMethod): void {
                // Validate parameter
                //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('BASE-HELPER: fieldName=%s,filterMethod=%s - CALLED!', $fieldName, $filterMethod));
                if (empty($fieldName)) {
@@ -291,7 +291,7 @@ abstract class BaseHelper extends BaseFrameworkSystem {
         * @return      void
         * @throws      InvalidArgumentException        If a parameter has an invalid value
         */
-       public function prefetchValueInstance (string $registryKey, string $extraKey = NULL) {
+       public function prefetchValueInstance (string $registryKey, string $extraKey = NULL): void {
                // Validate parameter
                //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('BASE-HELPER: registryKey=%s,extraKey[%s]=%s - CALLED!', $registryKey, gettype($extraKey), $extraKey));
                if (empty($registryKey)) {
@@ -344,7 +344,7 @@ abstract class BaseHelper extends BaseFrameworkSystem {
         * @throws      InvalidArgumentException        If a parameter has an invalid value
         * @throws      BadMethodCallException  If the group was already created before
         */
-       protected function openGroupByIdContent (string $groupId, string $content, string $tag) {
+       protected function openGroupByIdContent (string $groupId, string $content, string $tag): void {
                // Is the group already there?
                //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('BASE-HELPER: groupdId=%s,content=%s,tag=%s - CALLED!', $groupdId, $content, $tag));
                if (empty($groupId)) {
@@ -393,7 +393,7 @@ abstract class BaseHelper extends BaseFrameworkSystem {
         * @return      void
         * @throws      HelperNoPreviousOpenedGroupException    If no previously opened group was found
         */
-       public function closePreviousGroupByContent (string $content = '') {
+       public function closePreviousGroupByContent (string $content = ''): void {
                // Check if any sub group was opened before
                //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('BASE-HELPER: content(%d)=%s - CALLED!', strlen($content), $content));
                if ($this->ifSubGroupOpenedPreviously()) {
@@ -446,7 +446,7 @@ abstract class BaseHelper extends BaseFrameworkSystem {
         * @return      void
         * @throws      HelperSubGroupAlreadyCreatedException   If the sub group was already created before
         */
-       protected function openSubGroupByIdContent (string $subGroupId, string $content, string $tag) {
+       protected function openSubGroupByIdContent (string $subGroupId, string $content, string $tag): void {
                //* NOISY-DEBUG: */ echo "OPEN:subGroupId={$subGroupId},content=".htmlentities($content)."<br />\n";
                // Is the group already there?
                if (empty($subGroupId)) {
@@ -478,7 +478,7 @@ abstract class BaseHelper extends BaseFrameworkSystem {
         * @return      void
         * @throws      HelperNoPreviousOpenedSubGroupException If no previously opened sub group was found
         */
-       public function closePreviousSubGroupByContent (string $content = '') {
+       public function closePreviousSubGroupByContent (string $content = ''): void {
                // Check if any sub group was opened before
                if ($this->ifSubGroupOpenedPreviously() === false) {
                        // Then throw an exception
@@ -509,7 +509,7 @@ abstract class BaseHelper extends BaseFrameworkSystem {
         *
         * @return      $content        Rendered HTML content
         */
-       public function renderContent () {
+       public function renderContent (): string {
                // Initialize content
                $content = '';
 
@@ -559,7 +559,7 @@ abstract class BaseHelper extends BaseFrameworkSystem {
         * @return      $isOpened       Whether the specified group is open
         * @throws      InvalidArgumentException        If a parameter has an invalid value
         */
-       protected function ifGroupIsOpened (string $groupId) {
+       protected function ifGroupIsOpened (string $groupId): bool {
                // Check on parameter
                //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('BASE-HELPER: groupId=%s - CALLED!', $groupId));
                if (empty($groupId)) {
@@ -583,7 +583,7 @@ abstract class BaseHelper extends BaseFrameworkSystem {
         * @throws      InvalidArgumentException        If a parameter has an invalid value
         * @throws      NullPointerException    Thrown if $valueInstance is null
         */
-       public function getValueField (string $fieldName) {
+       public function getValueField (string $fieldName): mixed {
                // Check parameter
                //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('BASE-HELPER: fieldName=%s - CALLED!', $fieldName));
                if (empty($fieldName)) {
@@ -633,7 +633,7 @@ abstract class BaseHelper extends BaseFrameworkSystem {
         *
         * @return      $groupOpened    Whether any group was opened before
         */
-       protected final function ifGroupOpenedPreviously () {
+       protected final function ifGroupOpenedPreviously (): bool {
                $groupOpened = (!empty($this->previousGroupId));
                return $groupOpened;
        }
@@ -643,7 +643,7 @@ abstract class BaseHelper extends BaseFrameworkSystem {
         *
         * @return      $subGroupOpened         Whether any group was opened before
         */
-       protected final function ifSubGroupOpenedPreviously () {
+       protected final function ifSubGroupOpenedPreviously (): bool {
                $subGroupOpened = (!empty($this->previousSubGroupId));
                return $subGroupOpened;
        }
@@ -653,7 +653,7 @@ abstract class BaseHelper extends BaseFrameworkSystem {
         *
         * @return      $previousGroupId        Id of previously opened group
         */
-       protected final function getPreviousGroupId () {
+       protected final function getPreviousGroupId (): string {
                return $this->previousGroupId;
        }
 
@@ -663,7 +663,7 @@ abstract class BaseHelper extends BaseFrameworkSystem {
         * @param       $previousGroupId        Id of previously opened group
         * @return      void
         */
-       protected final function setPreviousGroupId (string $previousGroupId) {
+       protected final function setPreviousGroupId (string $previousGroupId): void {
                $this->previousGroupId = $previousGroupId;
        }
 
@@ -672,7 +672,7 @@ abstract class BaseHelper extends BaseFrameworkSystem {
         *
         * @return      $previousSubGroupId             Id of previously opened sub group
         */
-       protected final function getPreviousSubGroupId () {
+       protected final function getPreviousSubGroupId (): string {
                return $this->previousSubGroupId;
        }
 
@@ -682,7 +682,7 @@ abstract class BaseHelper extends BaseFrameworkSystem {
         * @param       $previousSubGroupId             Id of previously opened sub group
         * @return      void
         */
-       protected final function setPreviousSubGroupId (string $previousSubGroupId) {
+       protected final function setPreviousSubGroupId (string $previousSubGroupId): void {
                $this->previousSubGroupId = $previousSubGroupId;
        }
 
index dc7f7ca6204c75b76f709252002f17b391e28e50..6e5833300c28dab9a097565a18df6c8a317c57a2 100644 (file)
@@ -52,7 +52,7 @@ class HtmlBlockHelper extends BaseHtmlHelper implements HelpableTemplate {
         * @param       $blockName                      Name of the block we shall generate
         * @return      $helperInstance         A prepared instance of this helper
         */
-       public static final function createHtmlBlockHelper (CompileableTemplate $templateInstance, string $blockName) {
+       public static final function createHtmlBlockHelper (CompileableTemplate $templateInstance, string $blockName): HelpableTemplate {
                // Get new instance
                $helperInstance = new HtmlBlockHelper();
 
@@ -72,7 +72,7 @@ class HtmlBlockHelper extends BaseHtmlHelper implements HelpableTemplate {
         * @param       $blockName      Name of the block we shall generate
         * @return      void
         */
-       protected final function setBlockName (string $blockName) {
+       protected final function setBlockName (string $blockName): void {
                $this->blockName = $blockName;
        }
 
@@ -81,7 +81,7 @@ class HtmlBlockHelper extends BaseHtmlHelper implements HelpableTemplate {
         *
         * @return      $blockName      Name of the block we shall generate
         */
-       public final function getBlockName () {
+       public final function getBlockName (): string {
                return $this->blockName;
        }
 
@@ -90,7 +90,7 @@ class HtmlBlockHelper extends BaseHtmlHelper implements HelpableTemplate {
         *
         * @return      $withRegistration       Whether with registration date
         */
-       public function ifIncludeRegistrationStamp () {
+       public function ifIncludeRegistrationStamp (): bool {
                $withRegistration = FrameworkBootstrap::getConfigurationInstance()->isEnabled('block_shows_registration');
                return $withRegistration;
        }
@@ -102,7 +102,7 @@ class HtmlBlockHelper extends BaseHtmlHelper implements HelpableTemplate {
         * @param       $messageId                      Message id to load an assign
         * @return      void
         */
-       public function assignMessageField (string $templateVariable, string $messageId) {
+       public function assignMessageField (string $templateVariable, string $messageId): void {
                // Get message
                $message = FrameworkBootstrap::getLanguageInstance()->getMessage($messageId);
 
@@ -117,7 +117,7 @@ class HtmlBlockHelper extends BaseHtmlHelper implements HelpableTemplate {
         * @param       $actionValue    Action value to assign
         * @return      void
         */
-       public function assignLinkFieldWithAction (string $linkField, $actionValue) {
+       public function assignLinkFieldWithAction (string $linkField, $actionValue): void {
                $this->getTemplateInstance()->assignVariable($linkField . '_action', $actionValue);
        }
 
@@ -127,7 +127,7 @@ class HtmlBlockHelper extends BaseHtmlHelper implements HelpableTemplate {
         * @param       $userStatus             Raw user status from database layer
         * @return      $translated             Translated user status
         */
-       protected function doFilterUserStatusTranslator (string $userStatus) {
+       protected function doFilterUserStatusTranslator (string $userStatus): string {
                // Generate message id
                $messageId = sprintf('user_status_%s', strtolower($userStatus));
 
@@ -143,7 +143,7 @@ class HtmlBlockHelper extends BaseHtmlHelper implements HelpableTemplate {
         *
         * @return      void
         */
-       public function flushContent () {
+       public function flushContent (): void {
                // Get template instance
                $templateInstance = $this->getTemplateInstance();
 
index 224fb18565f9fc0d094e3a157a71d8ca7b9cfae5..15834831124b78d3ab21ea1cbdff496998a3dfc4 100644 (file)
@@ -54,7 +54,7 @@ class Html???Helper extends BaseHtmlHelper implements HelpableTemplate {
         * @param       $???Name                        Name of the ??? we shall generate
         * @return      $helperInstance         A prepared instance of this helper
         */
-       public final static function createHtml???Helper (CompileableTemplate $templateInstance, $???Name) {
+       public final static function createHtml???Helper (CompileableTemplate $templateInstance, $???Name): HelpableTemplate {
                // Get new instance
                $helperInstance = new Html???Helper();
 
@@ -74,7 +74,7 @@ class Html???Helper extends BaseHtmlHelper implements HelpableTemplate {
         * @return      void
         * @todo        0% done
         */
-       public function flushContent () {
+       public function flushContent (): void {
                DebugMiddleware::getSelfInstance()->partialStub("Please implement this method.");
        }
 
index 967ad93fcfd882feffe46811a82cd9a2e3802d35..9b2e058f5f6876e4068893076d99998767e8cac0 100644 (file)
@@ -83,7 +83,7 @@ class HtmlFormHelper extends BaseHtmlHelper implements HelpableTemplate {
         * @param       $withForm                       Whether include the form tag
         * @return      $helperInstance         A preparedf instance of this helper
         */
-       public static final function createHtmlFormHelper (CompileableTemplate $templateInstance, string $formName, string $formId = NULL, bool $withForm = true) {
+       public static final function createHtmlFormHelper (CompileableTemplate $templateInstance, string $formName, string $formId = NULL, bool $withForm = true): HelpableTemplate {
                // Get new instance
                $helperInstance = new HtmlFormHelper();
 
@@ -121,7 +121,7 @@ class HtmlFormHelper extends BaseHtmlHelper implements HelpableTemplate {
         * @throws      InvalidFormNameException        If the form name is invalid ( = false)
         * @todo        Add some unique PIN here to bypass problems with some browser and/or extensions
         */
-       public function addFormTag (string $formName = NULL, string $formId = NULL) {
+       public function addFormTag (string $formName = NULL, string $formId = NULL): void {
                // When the form is not yet opened at least form name must be valid
                if (($this->formOpened === false) && (is_null($formName))) {
                        // Thrown an exception
@@ -177,7 +177,7 @@ class HtmlFormHelper extends BaseHtmlHelper implements HelpableTemplate {
         * @return      void
         * @throws      FormClosedException             If the form is not yet opened
         */
-       public function addInputTextField (string $fieldName, string $fieldValue = '') {
+       public function addInputTextField (string $fieldName, string $fieldValue = ''): void {
                // Is the form opened?
                if (($this->formOpened === false) && ($this->formEnabled === true)) {
                        // Throw an exception
@@ -202,7 +202,7 @@ class HtmlFormHelper extends BaseHtmlHelper implements HelpableTemplate {
         * @param       $fieldName      Input field name
         * @return      void
         */
-       public function addInputTextFieldWithDefault (string $fieldName) {
+       public function addInputTextFieldWithDefault (string $fieldName): void {
                // Get the value from instance
                $fieldValue = $this->getValueField($fieldName);
                //* DEBUG: */ print __METHOD__.':'.$fieldName.'='.$fieldValue."<br />\n";
@@ -220,7 +220,7 @@ class HtmlFormHelper extends BaseHtmlHelper implements HelpableTemplate {
         * @return      void
         * @throws      FormClosedException             If the form is not yet opened
         */
-       public function addInputPasswordField (string $fieldName, string $fieldValue = '') {
+       public function addInputPasswordField (string $fieldName, string $fieldValue = ''): void {
                // Is the form opened?
                if (($this->formOpened === false) && ($this->formEnabled === true)) {
                        // Throw an exception
@@ -248,7 +248,7 @@ class HtmlFormHelper extends BaseHtmlHelper implements HelpableTemplate {
         * @return      void
         * @throws      FormClosedException             If the form is not yet opened
         */
-       public function addInputHiddenField (string $fieldName, string $fieldValue = '') {
+       public function addInputHiddenField (string $fieldName, string $fieldValue = ''): void {
                // Is the form opened?
                if (($this->formOpened === false) && ($this->formEnabled === true)) {
                        // Throw an exception
@@ -271,7 +271,7 @@ class HtmlFormHelper extends BaseHtmlHelper implements HelpableTemplate {
         * @param       $fieldName      Input field name
         * @return      void
         */
-       public function addInputHiddenFieldWithDefault (string $fieldName) {
+       public function addInputHiddenFieldWithDefault (string $fieldName): void {
                // Get the value from instance
                $fieldValue = $this->getValueField($fieldName);
                //* DEBUG: */ print __METHOD__.':'.$fieldName.'='.$fieldValue."<br />\n";
@@ -287,7 +287,7 @@ class HtmlFormHelper extends BaseHtmlHelper implements HelpableTemplate {
         * @param       $prefix         Prefix for configuration without trailing _
         * @return      void
         */
-       public function addInputHiddenConfiguredField (string $fieldName, string $prefix) {
+       public function addInputHiddenConfiguredField (string $fieldName, string $prefix): void {
                // Get the value from instance
                $fieldValue = FrameworkBootstrap::getConfigurationInstance()->getConfigEntry("{$prefix}_{$fieldName}");
                //* DEBUG: */ print __METHOD__.':'.$fieldName.'='.$fieldValue."<br />\n";
@@ -305,7 +305,7 @@ class HtmlFormHelper extends BaseHtmlHelper implements HelpableTemplate {
         * @return      void
         * @throws      FormClosedException             If the form is not yet opened
         */
-       public function addInputCheckboxField (string $fieldName, bool $fieldChecked = true) {
+       public function addInputCheckboxField (string $fieldName, bool $fieldChecked = true): void {
                // Is the form opened?
                if (($this->formOpened === false) && ($this->formEnabled === true)) {
                        // Throw an exception
@@ -335,7 +335,7 @@ class HtmlFormHelper extends BaseHtmlHelper implements HelpableTemplate {
         * @return      void
         * @throws      FormClosedException             If the form is not yet opened
         */
-       public function addInputResetButton (string $buttonText) {
+       public function addInputResetButton (string $buttonText): void {
                // Is the form opened?
                if (($this->formOpened === false) && ($this->formEnabled === true)) {
                        // Throw an exception
@@ -360,7 +360,7 @@ class HtmlFormHelper extends BaseHtmlHelper implements HelpableTemplate {
         * @return      void
         * @throws      FormClosedException             If the form is not yet opened
         */
-       public function addInputSubmitButton (string $buttonText) {
+       public function addInputSubmitButton (string $buttonText): void {
                // Is the form opened?
                if (($this->formOpened === false) && ($this->formEnabled === true)) {
                        // Throw an exception
@@ -387,7 +387,7 @@ class HtmlFormHelper extends BaseHtmlHelper implements HelpableTemplate {
         * @throws      FormClosedException             If no form has been opened before
         * @throws      InvalidArgumentException        If $groupId is not set
         */
-       public function addFormGroup (string $groupId = '', string $groupText = '') {
+       public function addFormGroup (string $groupId = '', string $groupText = ''): void {
                // Is a form opened?
                if (($this->formOpened === false) && ($this->formEnabled === true)) {
                        // Throw exception here
@@ -403,7 +403,7 @@ class HtmlFormHelper extends BaseHtmlHelper implements HelpableTemplate {
                // Same group to open?
                if (($this->ifGroupOpenedPreviously() === false) && ($groupId === $this->getPreviousGroupId())) {
                        // Abort here silently
-                       return false;
+                       return;
                }
 
                // Initialize content with closing div by default
@@ -459,7 +459,7 @@ class HtmlFormHelper extends BaseHtmlHelper implements HelpableTemplate {
         * @throws      FormFormClosedException         If no group has been opened before
         * @throws      InvalidArgumentException                If $subGroupId is not set
         */
-       public function addFormSubGroup (string $subGroupId = '', string $subGroupText = '') {
+       public function addFormSubGroup (string $subGroupId = '', string $subGroupText = ''): void {
                // Is a group opened?
                if ($this->ifGroupOpenedPreviously() === false) {
                        // Throw exception here
@@ -475,7 +475,7 @@ class HtmlFormHelper extends BaseHtmlHelper implements HelpableTemplate {
                // Same sub group to open?
                if (($this->ifSubGroupOpenedPreviously() === false) && ($subGroupId == $this->getPreviousSubGroupId())) {
                        // Abort here silently
-                       return false;
+                       return;
                }
 
                // Initialize content with closing div by default
@@ -522,7 +522,7 @@ class HtmlFormHelper extends BaseHtmlHelper implements HelpableTemplate {
         * @return      void
         * @throws      FormClosedException             If the form is not yet opened
         */
-       public function addFieldLabel (string $fieldName, string $fieldText, string $fieldTitle = '') {
+       public function addFieldLabel (string $fieldName, string $fieldText, string $fieldTitle = ''): void {
                // Is the form opened?
                if (($this->formOpened === false) && ($this->formEnabled === true)) {
                        // Throw an exception
@@ -561,7 +561,7 @@ class HtmlFormHelper extends BaseHtmlHelper implements HelpableTemplate {
         * @return      void
         * @throws      FormClosedException             If the form is not yet opened
         */
-       public function addFormNote (string $noteId, string $formNotes) {
+       public function addFormNote (string $noteId, string $formNotes): void {
                // Is the form opened?
                if (($this->formOpened === false) && ($this->formEnabled === true)) {
                        // Throw an exception
@@ -589,7 +589,7 @@ class HtmlFormHelper extends BaseHtmlHelper implements HelpableTemplate {
         * @return      void
         * @throws      FormClosedException             If the form is not yet opened
         */
-       public function addInputSelectField (string $selectId, string $firstEntry) {
+       public function addInputSelectField (string $selectId, string $firstEntry): void {
                // Is the form group opened?
                if (($this->formOpened === false) && ($this->formEnabled === true)) {
                        // Throw an exception
@@ -636,7 +636,7 @@ class HtmlFormHelper extends BaseHtmlHelper implements HelpableTemplate {
         * @throws      HelperNoPreviousOpenedSubGroupException If no previously opened sub group was found
         * @todo        Add checking if sub option is already added
         */
-       public function addSelectSubOption (string $subName, string $subValue) {
+       public function addSelectSubOption (string $subName, string $subValue): void {
                // Is there a sub group (shall be a selection box!)
                if ($this->ifSubGroupOpenedPreviously() === false) {
                        // Then throw an exception here
@@ -664,7 +664,7 @@ class HtmlFormHelper extends BaseHtmlHelper implements HelpableTemplate {
         * @throws      HelperNoPreviousOpenedSubGroupException If no previously opened sub group was found
         * @todo        Add checking if sub option is already added
         */
-       public function addSelectOption (string $optionName, string $optionValue) {
+       public function addSelectOption (string $optionName, string $optionValue): void {
                // Is there a sub group (shall be a selection box!)
                if ($this->ifSubGroupOpenedPreviously() === false) {
                        // Then throw an exception here
@@ -687,7 +687,7 @@ class HtmlFormHelper extends BaseHtmlHelper implements HelpableTemplate {
         *
         * @return      void
         */
-       public function addCaptcha () {
+       public function addCaptcha (): void {
                // Init instance
                $extraInstance = NULL;
 
@@ -718,7 +718,7 @@ class HtmlFormHelper extends BaseHtmlHelper implements HelpableTemplate {
         * @param       $formEnabled    Whether form is enabled or disabled
         * @return      void
         */
-       public final function enableForm (bool $formEnabled = true) {
+       public final function enableForm (bool $formEnabled = true): void {
                $this->formEnabled = $formEnabled;
        }
 
@@ -728,7 +728,7 @@ class HtmlFormHelper extends BaseHtmlHelper implements HelpableTemplate {
         * @param       $formName       Name of this form
         * @return      void
         */
-       public final function setFormName (string $formName) {
+       public final function setFormName (string $formName): void {
                $this->formName = $formName;
        }
 
@@ -737,7 +737,7 @@ class HtmlFormHelper extends BaseHtmlHelper implements HelpableTemplate {
         *
         * @return      $formName       Name of this form
         */
-       public final function getFormName () {
+       public final function getFormName (): string {
                return $this->formName;
        }
 
@@ -747,7 +747,7 @@ class HtmlFormHelper extends BaseHtmlHelper implements HelpableTemplate {
         * @param       $formId Id of this form
         * @return      void
         */
-       public final function setFormId (string $formId) {
+       public final function setFormId (string $formId): void {
                $this->formId = $formId;
        }
 
@@ -756,7 +756,7 @@ class HtmlFormHelper extends BaseHtmlHelper implements HelpableTemplate {
         *
         * @return      $formId Id of this form
         */
-       public final function getFormId () {
+       public final function getFormId (): string {
                return $this->formId;
        }
 
@@ -765,7 +765,7 @@ class HtmlFormHelper extends BaseHtmlHelper implements HelpableTemplate {
         *
         * @return      $required       Whether the email address is required
         */
-       public function ifRegisterRequiresEmailVerification () {
+       public function ifRegisterRequiresEmailVerification (): bool {
                $required = FrameworkBootstrap::getConfigurationInstance()->isEnabled('register_requires_email');
                return $required;
        }
@@ -775,7 +775,7 @@ class HtmlFormHelper extends BaseHtmlHelper implements HelpableTemplate {
         *
         * @return      $required       Whether profile data shall be asked
         */
-       public function ifRegisterIncludesProfile () {
+       public function ifRegisterIncludesProfile (): bool {
                $required = FrameworkBootstrap::getConfigurationInstance()->isEnabled('register_includes_profile');
                return $required;
        }
@@ -785,7 +785,7 @@ class HtmlFormHelper extends BaseHtmlHelper implements HelpableTemplate {
         *
         * @return      $isSecured      Whether this form is secured by a CAPTCHA
         */
-       public function ifFormSecuredWithCaptcha () {
+       public function ifFormSecuredWithCaptcha (): bool {
                $isSecured = FrameworkBootstrap::getConfigurationInstance()->isEnabled($this->getFormName() . '_captcha_secured');
                return $isSecured;
        }
@@ -795,7 +795,7 @@ class HtmlFormHelper extends BaseHtmlHelper implements HelpableTemplate {
         *
         * @return      $required       Whether personal data shall be asked
         */
-       public function ifRegisterIncludesPersonaData () {
+       public function ifRegisterIncludesPersonaData (): bool {
                $required = FrameworkBootstrap::getConfigurationInstance()->isEnabled('register_personal_data');
                return $required;
        }
@@ -805,7 +805,7 @@ class HtmlFormHelper extends BaseHtmlHelper implements HelpableTemplate {
         *
         * @return      $required       Whether birthday shall be asked
         */
-       public function ifProfileIncludesBirthDay () {
+       public function ifProfileIncludesBirthDay (): bool {
                $required = FrameworkBootstrap::getConfigurationInstance()->isEnabled('profile_includes_birthday');
                return $required;
        }
@@ -815,7 +815,7 @@ class HtmlFormHelper extends BaseHtmlHelper implements HelpableTemplate {
         *
         * @return      $isUnique
         */
-       public function ifEmailMustBeUnique () {
+       public function ifEmailMustBeUnique (): bool {
                $isUnique = FrameworkBootstrap::getConfigurationInstance()->isEnabled('register_email_unique');
                return $isUnique;
        }
@@ -825,7 +825,7 @@ class HtmlFormHelper extends BaseHtmlHelper implements HelpableTemplate {
         *
         * @return      $required       Whether the specified chat protocol is enabled
         */
-       public function ifChatEnabled (string $chatProtocol) {
+       public function ifChatEnabled (string $chatProtocol): bool {
                $required = FrameworkBootstrap::getConfigurationInstance()->isEnabled('chat_protocol_' . $chatProtocol);
                return $required;
        }
@@ -835,7 +835,7 @@ class HtmlFormHelper extends BaseHtmlHelper implements HelpableTemplate {
         *
         * @return      $isEnabled      Whether the login is enabled or disabled
         */
-       public function ifLoginIsEnabled () {
+       public function ifLoginIsEnabled (): bool {
                $isEnabled = FrameworkBootstrap::getConfigurationInstance()->isEnabled('user_login');
                return $isEnabled;
        }
@@ -845,7 +845,7 @@ class HtmlFormHelper extends BaseHtmlHelper implements HelpableTemplate {
         *
         * @return      $isEnabled      Whether the login shall be done by username
         */
-       public function ifLoginWithUsername () {
+       public function ifLoginWithUsername (): bool {
                $isEnabled = (FrameworkBootstrap::getConfigurationInstance()->getConfigEntry('login_type') == 'username');
                return $isEnabled;
        }
@@ -855,7 +855,7 @@ class HtmlFormHelper extends BaseHtmlHelper implements HelpableTemplate {
         *
         * @return      $isEnabled      Whether the login shall be done by email
         */
-       public function ifLoginWithEmail () {
+       public function ifLoginWithEmail (): bool {
                $isEnabled = (FrameworkBootstrap::getConfigurationInstance()->getConfigEntry('login_type') == 'email');
                return $isEnabled;
        }
@@ -865,7 +865,7 @@ class HtmlFormHelper extends BaseHtmlHelper implements HelpableTemplate {
         *
         * @return      $isAllowed      Whether guest login is allowed
         */
-       public function ifGuestLoginAllowed () {
+       public function ifGuestLoginAllowed (): bool {
                $isAllowed = FrameworkBootstrap::getConfigurationInstance()->isEnabled('guest_login');
                return $isAllowed;
        }
@@ -875,7 +875,7 @@ class HtmlFormHelper extends BaseHtmlHelper implements HelpableTemplate {
         *
         * @return      $requireConfirm         Whether email change must be confirmed
         */
-       public function ifEmailChangeRequireConfirmation () {
+       public function ifEmailChangeRequireConfirmation (): bool {
                $requireConfirm = FrameworkBootstrap::getConfigurationInstance()->isEnabled('email_change_confirmation');
                return $requireConfirm;
        }
@@ -886,7 +886,7 @@ class HtmlFormHelper extends BaseHtmlHelper implements HelpableTemplate {
         * @return      $rulesUpdated   Whether rules has been updated
         * @todo        Implement check if rules have been changed
         */
-       public function ifRulesHaveChanged () {
+       public function ifRulesHaveChanged (): bool {
                return false;
        }
 
@@ -895,7 +895,7 @@ class HtmlFormHelper extends BaseHtmlHelper implements HelpableTemplate {
         *
         * @return      $emailChange    Whether changing email address is allowed
         */
-       public function ifEmailChangeAllowed () {
+       public function ifEmailChangeAllowed (): bool {
                $emailChange = FrameworkBootstrap::getConfigurationInstance()->isEnabled('email_change');
                return $emailChange;
        }
@@ -905,7 +905,7 @@ class HtmlFormHelper extends BaseHtmlHelper implements HelpableTemplate {
         *
         * @return      $isUnconfirmed  Whether the user account is unconfirmed
         */
-       public function ifUserAccountUnconfirmed () {
+       public function ifUserAccountUnconfirmed (): bool {
                $isUnconfirmed = ($this->getValueField(UserDatabaseFrontend::DB_COLUMN_USER_STATUS) === FrameworkBootstrap::getConfigurationInstance()->getConfigEntry('user_status_unconfirmed'));
                return $isUnconfirmed;
        }
@@ -915,7 +915,7 @@ class HtmlFormHelper extends BaseHtmlHelper implements HelpableTemplate {
         *
         * @return      $isUnconfirmed  Whether the user account is locked
         */
-       public function ifUserAccountLocked () {
+       public function ifUserAccountLocked (): bool {
                $isUnconfirmed = ($this->getValueField(UserDatabaseFrontend::DB_COLUMN_USER_STATUS) === FrameworkBootstrap::getConfigurationInstance()->getConfigEntry('user_status_locked'));
                return $isUnconfirmed;
        }
@@ -925,7 +925,7 @@ class HtmlFormHelper extends BaseHtmlHelper implements HelpableTemplate {
         *
         * @return      $isUnconfirmed  Whether the user account is a guest
         */
-       public function ifUserAccountGuest () {
+       public function ifUserAccountGuest (): bool {
                $isUnconfirmed = ($this->getValueField(UserDatabaseFrontend::DB_COLUMN_USER_STATUS) === FrameworkBootstrap::getConfigurationInstance()->getConfigEntry('user_status_guest'));
                return $isUnconfirmed;
        }
@@ -936,7 +936,7 @@ class HtmlFormHelper extends BaseHtmlHelper implements HelpableTemplate {
         *
         * @return      $refillActive   Whether the refill page is active
         */
-       public function ifRefillPageActive () {
+       public function ifRefillPageActive (): bool {
                $refillActive = FrameworkBootstrap::getConfigurationInstance()->isEnabled('refill_page_active');
                return $refillActive;
        }
@@ -948,7 +948,7 @@ class HtmlFormHelper extends BaseHtmlHelper implements HelpableTemplate {
         * @return      void
         * @throws      FormOpenedException             If the form is still open
         */
-       public function flushContent () {
+       public function flushContent (): void {
                // Is the form still open?
                if (($this->formOpened === true) && ($this->formEnabled === true)) {
                        // Close the form automatically
index 170a309231c21ae1ef78a3bc3dff51877b952e15..42d5202de75e2f3903f6809c0e782e1a491652f5 100644 (file)
@@ -74,7 +74,7 @@ class HtmlLinkHelper extends BaseHtmlHelper implements HelpableTemplate {
         * @return      $helperInstance         A prepared instance of this helper
         * @throws      NoConfigEntryException  A deprecated exception at this point
         */
-       public static final function createHtmlLinkHelper (CompileableTemplate $templateInstance, string $linkName, $linkBase = NULL) {
+       public static final function createHtmlLinkHelper (CompileableTemplate $templateInstance, string $linkName, $linkBase = NULL): HelpableTemplate {
                // Get new instance
                $helperInstance = new HtmlLinkHelper();
 
@@ -139,7 +139,7 @@ class HtmlLinkHelper extends BaseHtmlHelper implements HelpableTemplate {
         * @param       $extraContent   Optional extra HTML content
         * @return      $linkContent    Rendered text link content
         */
-       private function renderLinkContentWithTextExtraContent (string $linkText, string $linkTitle, string $extraContent = '') {
+       private function renderLinkContentWithTextExtraContent (string $linkText, string $linkTitle, string $extraContent = ''): string {
                // Construct link content
                $linkContent = sprintf('<a href="{?base_url?}/%s%s" title="%s">%s</a>',
                        $this->getLinkBase(),
@@ -158,7 +158,7 @@ class HtmlLinkHelper extends BaseHtmlHelper implements HelpableTemplate {
         * @param       $linkName       Name of the link we shall generate
         * @return      void
         */
-       protected final function setLinkName (string $linkName) {
+       protected final function setLinkName (string $linkName): void {
                $this->linkName = $linkName;
        }
 
@@ -167,7 +167,7 @@ class HtmlLinkHelper extends BaseHtmlHelper implements HelpableTemplate {
         *
         * @return      $linkName       Name of the link we shall generate
         */
-       public final function getLinkName () {
+       public final function getLinkName (): string {
                return $this->linkName;
        }
 
@@ -177,7 +177,7 @@ class HtmlLinkHelper extends BaseHtmlHelper implements HelpableTemplate {
         * @param       $linkBase       Base of the link we shall generate
         * @return      void
         */
-       protected final function setLinkBase (string $linkBase) {
+       protected final function setLinkBase (string $linkBase): void {
                $this->linkBase = $linkBase;
        }
 
@@ -186,7 +186,7 @@ class HtmlLinkHelper extends BaseHtmlHelper implements HelpableTemplate {
         *
         * @return      $linkBase       Base of the link we shall generate
         */
-       public final function getLinkBase () {
+       public final function getLinkBase (): string {
                return $this->linkBase;
        }
 
@@ -196,7 +196,7 @@ class HtmlLinkHelper extends BaseHtmlHelper implements HelpableTemplate {
         * @return      void
         * @todo        Completely unimplemented
         */
-       public function flushContent () {
+       public function flushContent (): void {
                // Is a previous opened group still open?
                if ($this->ifGroupOpenedPreviously()) {
                        // Then close it
@@ -222,7 +222,7 @@ class HtmlLinkHelper extends BaseHtmlHelper implements HelpableTemplate {
         * @param       $groupCode      Code to open and close groups
         * @return      void
         */
-       public function addLinkGroup (string $groupId, string $groupText, string $groupCode = 'div') {
+       public function addLinkGroup (string $groupId, string $groupText, string $groupCode = 'div'): void {
                // Is a group with that name open?
                if ($this->ifGroupOpenedPreviously()) {
                        // Then close it here
@@ -251,7 +251,7 @@ class HtmlLinkHelper extends BaseHtmlHelper implements HelpableTemplate {
         * @return      void
         * @throws      NoGroupOpenedException  If no previous group was opened
         */
-       public function addLinkNote (string $groupId, string $groupNote, string $groupCode = 'div') {
+       public function addLinkNote (string $groupId, string $groupNote, string $groupCode = 'div'): void {
                // Check if a previous group was opened
                if ($this->ifGroupOpenedPreviously() === false) {
                        // No group was opened before!
@@ -284,7 +284,7 @@ class HtmlLinkHelper extends BaseHtmlHelper implements HelpableTemplate {
         * @return      void
         * @throws      NoGroupOpenedException  If no previous group was opened
         */
-       protected function addActionLink (string $linkAction, string $linkText, string $linkTitle) {
+       protected function addActionLink (string $linkAction, string $linkText, string $linkTitle): void {
                // Check if a previous group was opened
                if ($this->ifGroupOpenedPreviously() === false) {
                        // No group was opened before!
@@ -321,7 +321,7 @@ class HtmlLinkHelper extends BaseHtmlHelper implements HelpableTemplate {
         * @param       $languageId             Language id string to use
         * @return      void
         */
-       public function addActionLinkById (string $linkAction, string $languageId) {
+       public function addActionLinkById (string $linkAction, string $languageId): void {
                // Resolve the language string
                $languageResolvedText = FrameworkBootstrap::getLanguageInstance()->getMessage('link_' . $languageId . '_text');
 
@@ -339,7 +339,7 @@ class HtmlLinkHelper extends BaseHtmlHelper implements HelpableTemplate {
         * @param       $languageId             Language id string to use
         * @return      void
         */
-       public function addLinkWithTextById (string $languageId) {
+       public function addLinkWithTextById (string $languageId): void {
                // Resolve the language string
                $languageResolvedText = FrameworkBootstrap::getLanguageInstance()->getMessage('link_' . $languageId . '_text');
 
index 76871d1b1fb5e2a4f037fa85e4947163cbd8da5a..dcebe90d441b6a1571f718dd2adb4d9068c8cdf8 100644 (file)
@@ -124,8 +124,9 @@ abstract class BaseImage extends BaseFrameworkSystem implements Registerable {
         * @param       $colorMode              Whether background or foreground color
         * @param       $colorChannel   Red, green or blue channel?
         * @param       $colorValue             Value to set
+        * @return      void
         */
-       private function setColor (string $colorMode, string $colorChannel, $colorValue) {
+       private function setColor (string $colorMode, string $colorChannel, $colorValue): void {
                // Construct the eval() command
                $eval = sprintf("\$this->%s['%s'] = \"%s\";",
                        $colorMode,
@@ -144,7 +145,7 @@ abstract class BaseImage extends BaseFrameworkSystem implements Registerable {
         * @param       $width  Width of the image
         * @return      void
         */
-       public final function setWidth (int $width) {
+       public final function setWidth (int $width): void {
                $this->width = $width;
        }
 
@@ -153,7 +154,7 @@ abstract class BaseImage extends BaseFrameworkSystem implements Registerable {
         *
         * @return      $width  Width of the image
         */
-       public final function getWidth () {
+       public final function getWidth (): int {
                return $this->width;
        }
 
@@ -163,7 +164,7 @@ abstract class BaseImage extends BaseFrameworkSystem implements Registerable {
         * @param       $height Height of the image
         * @return      void
         */
-       public final function setHeight (int $height) {
+       public final function setHeight (int $height): void {
                $this->height = $height;
        }
 
@@ -172,7 +173,7 @@ abstract class BaseImage extends BaseFrameworkSystem implements Registerable {
         *
         * @return      $height Height of the image
         */
-       public final function getHeight () {
+       public final function getHeight (): int {
                return $this->height;
        }
 
@@ -182,7 +183,7 @@ abstract class BaseImage extends BaseFrameworkSystem implements Registerable {
         * @return      void
         * @todo        Find something usefull for this method.
         */
-       public function finishType () {
+       public function finishType (): void {
                // Empty at the momemt
        }
 
@@ -192,7 +193,7 @@ abstract class BaseImage extends BaseFrameworkSystem implements Registerable {
         * @return      void
         * @todo        Find something usefull for this method.
         */
-       public function initResolution () {
+       public function initResolution (): void {
                // Empty at the momemt
        }
 
@@ -202,7 +203,7 @@ abstract class BaseImage extends BaseFrameworkSystem implements Registerable {
         * @return      void
         * @todo        Find something usefull for this method.
         */
-       public function finishResolution () {
+       public function finishResolution (): void {
                // Empty at the momemt
        }
 
@@ -212,7 +213,7 @@ abstract class BaseImage extends BaseFrameworkSystem implements Registerable {
         * @return      void
         * @todo        Find something usefull for this method.
         */
-       public function initBase () {
+       public function initBase (): void {
                // Empty at the momemt
        }
 
@@ -222,7 +223,7 @@ abstract class BaseImage extends BaseFrameworkSystem implements Registerable {
         * @return      void
         * @todo        Find something usefull for this method.
         */
-       public function finishBase () {
+       public function finishBase (): void {
                // Empty at the momemt
        }
 
@@ -231,7 +232,7 @@ abstract class BaseImage extends BaseFrameworkSystem implements Registerable {
         *
         * @return      void
         */
-       public function initBackgroundColor () {
+       public function initBackgroundColor (): void {
                $this->colorMode = 'backgroundColor';
        }
 
@@ -241,7 +242,7 @@ abstract class BaseImage extends BaseFrameworkSystem implements Registerable {
         * @return      void
         * @todo        Find something usefull for this method.
         */
-       public function finishBackgroundColor () {
+       public function finishBackgroundColor (): void {
                // Empty at the moment
        }
 
@@ -250,7 +251,7 @@ abstract class BaseImage extends BaseFrameworkSystem implements Registerable {
         *
         * @return      void
         */
-       public function initForegroundColor () {
+       public function initForegroundColor (): void {
                $this->colorMode = 'foregroundColor';
        }
 
@@ -260,7 +261,7 @@ abstract class BaseImage extends BaseFrameworkSystem implements Registerable {
         * @return      void
         * @todo        Find something usefull for this method.
         */
-       public function finishForegroundColor () {
+       public function finishForegroundColor (): void {
                // Empty at the moment
        }
 
@@ -271,7 +272,7 @@ abstract class BaseImage extends BaseFrameworkSystem implements Registerable {
         * @return      void
         * @todo        Find something usefull for this method.
         */
-       public function initImageString (string $groupable = 'single') {
+       public function initImageString (string $groupable = 'single'): void {
                $this->groupable = $groupable;
        }
 
@@ -281,7 +282,7 @@ abstract class BaseImage extends BaseFrameworkSystem implements Registerable {
         * @return      void
         * @todo        Find something usefull for this method.
         */
-       public function finishImageString () {
+       public function finishImageString (): void {
                // Empty at the momemt
        }
 
@@ -291,7 +292,7 @@ abstract class BaseImage extends BaseFrameworkSystem implements Registerable {
         * @param       $red    Red color value
         * @return      void
         */
-       public final function setRed ($red) {
+       public final function setRed ($red): void {
                // Set image color
                $this->setColor($this->colorMode, 'red', $red);
        }
@@ -302,7 +303,7 @@ abstract class BaseImage extends BaseFrameworkSystem implements Registerable {
         * @param       $green  Green color value
         * @return      void
         */
-       public final function setGreen ($green) {
+       public final function setGreen ($green): void {
                // Set image color
                $this->setColor($this->colorMode, 'green', $green);
        }
@@ -313,7 +314,7 @@ abstract class BaseImage extends BaseFrameworkSystem implements Registerable {
         * @param       $blue   Blue color value
         * @return      void
         */
-       public final function setBlue ($blue) {
+       public final function setBlue ($blue): void {
                // Set image color
                $this->setColor($this->colorMode, 'blue', $blue);
        }
@@ -324,7 +325,7 @@ abstract class BaseImage extends BaseFrameworkSystem implements Registerable {
         * @param       $string         String to set in image
         * @return      void
         */
-       public final function setString (string $string) {
+       public final function setString (string $string): void {
                $this->imageString = $string;
        }
 
@@ -333,26 +334,26 @@ abstract class BaseImage extends BaseFrameworkSystem implements Registerable {
         *
         * @return      $string         String to set in image
         */
-       public final function getString () {
+       public final function getString (): string {
                return $this->imageString;
        }
 
        /**
         * Setter for image type
         *
-        * @param       $imageType              Type to set in image
+        * @param       $imageType      Type to set in image
         * @return      void
         */
-       protected final function setImageType (string $imageType) {
+       protected final function setImageType (string $imageType): void {
                $this->imageType = $imageType;
        }
 
        /**
         * Getter for image type
         *
-        * @return      $imageType              Type to set in image
+        * @return      $imageType      Type to get from image
         */
-       public final function getImageType () {
+       public final function getImageType (): string {
                return $this->imageType;
        }
 
@@ -362,7 +363,7 @@ abstract class BaseImage extends BaseFrameworkSystem implements Registerable {
         * @param       $name   Name of the image
         * @return      void
         */
-       public final function setImageName (string $name) {
+       public final function setImageName (string $name): void {
                $this->imageName = $name;
        }
 
@@ -371,7 +372,7 @@ abstract class BaseImage extends BaseFrameworkSystem implements Registerable {
         *
         * @return      $name   Name of the image
         */
-       public final function getImageName () {
+       public final function getImageName (): string {
                return $this->imageName;
        }
 
@@ -390,7 +391,7 @@ abstract class BaseImage extends BaseFrameworkSystem implements Registerable {
         * @param       $x      X coordinate
         * @return      void
         */
-       public final function setX (int $x) {
+       public final function setX (int $x): void {
                $this->x = $x;
        }
 
@@ -399,7 +400,7 @@ abstract class BaseImage extends BaseFrameworkSystem implements Registerable {
         *
         * @return      $x      X coordinate
         */
-       public final function getX () {
+       public final function getX (): int {
                return $this->x;
        }
 
@@ -409,7 +410,7 @@ abstract class BaseImage extends BaseFrameworkSystem implements Registerable {
         * @param       $y      Y coordinate
         * @return      void
         */
-       public final function setY (int $y) {
+       public final function setY (int $y): void {
                $this->y = $y;
        }
 
@@ -418,7 +419,7 @@ abstract class BaseImage extends BaseFrameworkSystem implements Registerable {
         *
         * @return      $y      Y coordinate
         */
-       public final function getY () {
+       public final function getY (): int {
                return $this->y;
        }
 
@@ -428,7 +429,7 @@ abstract class BaseImage extends BaseFrameworkSystem implements Registerable {
         * @param       $fontSize       Font size for strings
         * @return      void
         */
-       public final function setFontSize (int $fontSize) {
+       public final function setFontSize (int $fontSize): void {
                $this->fontSize = $fontSize;
        }
 
@@ -437,7 +438,7 @@ abstract class BaseImage extends BaseFrameworkSystem implements Registerable {
         *
         * @return      $fontSize       Font size for strings
         */
-       public final function getFontSize () {
+       public final function getFontSize (): int {
                return $this->fontSize;
        }
 
@@ -447,7 +448,7 @@ abstract class BaseImage extends BaseFrameworkSystem implements Registerable {
         * @param       $stringName             String name to set
         * @return      void
         */
-       public final function setStringName(string $stringName) {
+       public final function setStringName(string $stringName): void {
                $this->stringName = $stringName;
        }
 
@@ -456,7 +457,7 @@ abstract class BaseImage extends BaseFrameworkSystem implements Registerable {
         *
         * @return      void
         */
-       public function finishImage () {
+       public function finishImage (): void {
                // Compile width and height
                $width = $this->getTemplateInstance()->compileRawCode($this->getWidth());
                $height = $this->getTemplateInstance()->compileRawCode($this->getHeight());
@@ -545,7 +546,7 @@ abstract class BaseImage extends BaseFrameworkSystem implements Registerable {
         *
         * @return      $imageContent   The raw image content
         */
-       public function getContent () {
+       public function getContent (): string {
                // Get cache file name
                $cacheFile = $this->getTemplateInstance()->getImageCacheFile();
 
index d08a1d90400f76376655fa091cdbd77e309c6c0b..0a1962065c1a5bd2ed51699a32ee63af15e5fe2a 100644 (file)
@@ -47,7 +47,7 @@ class ???Iterator extends BaseIterator implements Iterator {
         *
         * @return      $iteratorInstance       An instance of a Iterator class
         */
-       public final static function create???Iterator () {
+       public final static function create???Iterator (): Iterator {
                // Get new instance
                $iteratorInstance = new ???Iterator();
 
index 0ee6110fa7500ed5a9b16ac199e3a0cce59bc776..27ffd8d620949037119667bce43b031ac2f65ce5 100644 (file)
@@ -54,7 +54,7 @@ class DefaultIterator extends BaseIterator implements Iterator, Registerable {
         * @param       $listInstance           A list of a Listable
         * @return      $iteratorInstance       An instance a Iterator class
         */
-       public static final function createDefaultIterator (Listable $listInstance): DefaultIterator {
+       public static final function createDefaultIterator (Listable $listInstance): Iterator {
                // Get new instance
                //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->traceMessage(sprintf('DEFAULT-ITERATOR: listInstance=%s - CALLED!', $listInstance));
                $iteratorInstance = new DefaultIterator();
index 5915427c0eb21a05d66cf941a76174d87fe475ea..d4838b06667ffc24a01d0e2d7951faebad62ceca 100644 (file)
@@ -56,7 +56,7 @@ class FileIterator extends BaseIterator implements SeekableIterator {
         * @param       $binaryFileInstance     An instance of a BinaryFile class
         * @return      $iteratorInstance       An instance of a Iterator class
         */
-       public final static function createFileIterator (BinaryFile $binaryFileInstance): FileIterator {
+       public final static function createFileIterator (BinaryFile $binaryFileInstance): SeekableIterator {
                // Get new instance
                //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('FILE-ITERATOR: binaryFileInstance=%s - CALLED!', $binaryFileInstance->__toString()));
                $iteratorInstance = new FileIterator();
index 4aed57542155218b06ab02b0a47940e555c25894..b2031343178ac2bdc60ba5a1914e810719daf70b 100644 (file)
@@ -83,7 +83,7 @@ class RegistryIterator extends BaseIterator implements IteratableRegistry {
         * @param       $registryInstance       An instance of a Register class
         * @return      $iteratorInstance       An instance of a Iterator class
         */
-       public final static function createRegistryIterator (Register $registryInstance): RegistryIterator {
+       public final static function createRegistryIterator (Register $registryInstance): IteratableRegistry {
                // Get new instance
                //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->traceMessage(sprintf('REGISTRY-ITERATOR: registryInstance=%s - CALLED!', $registryInstance->__toString()));
                $iteratorInstance = new RegistryIterator();
index c04091301fa7af13999373d2b3cf7c4adace40fd..74565f2822cf0dc1b200642bfdc5dd100b81c944 100644 (file)
@@ -51,7 +51,7 @@ class XmlParser extends BaseParser implements Parseable {
         * @param       $templateInstance       A CompileableTemplate instance
         * @return      $parserInstance         An instance of this parser
         */
-       public static final function createXmlParser (CompileableTemplate $templateInstance) {
+       public static final function createXmlParser (CompileableTemplate $templateInstance): Parseable {
                // Get a new instance
                $parserInstance = new XmlParser();
 
index 7536d2e6d686ffe25e18ea7509111545b3a4396b..b8996cb07f1f8822479daa30ca41e6cc325a9bc3 100644 (file)
@@ -47,19 +47,19 @@ class ImageTemplateEngine extends BaseTemplateEngine implements CompileableTempl
        /**
         * Main nodes in the XML tree ('image' is ignored)
         */
-       private $mainNodes = array(
+       private $mainNodes = [
                'base',
                'type',
                'resolution',
                'background-color',
                'foreground-color',
                'image-string'
-       );
+       ];
 
        /**
         * Sub nodes in the XML tree
         */
-       private $subNodes = array(
+       private $subNodes = [
                'name',
                'string-name',
                'x',
@@ -71,7 +71,7 @@ class ImageTemplateEngine extends BaseTemplateEngine implements CompileableTempl
                'green',
                'blue',
                'text'
-       );
+       ];
 
        /**
         * Current main node
@@ -103,7 +103,7 @@ class ImageTemplateEngine extends BaseTemplateEngine implements CompileableTempl
         * @throws      BasePathReadProtectedException  If $templateBasePath is
         *                                                                                      read-protected
         */
-       public static final function createImageTemplateEngine () {
+       public static final function createImageTemplateEngine (): CompileableTemplate {
                // Get a new instance
                $templateInstance = new ImageTemplateEngine();
 
@@ -147,7 +147,7 @@ class ImageTemplateEngine extends BaseTemplateEngine implements CompileableTempl
         *
         * @return      $currMainNode   Current main node
         */
-       public final function getCurrMainNode () {
+       public final function getCurrMainNode (): string {
                return $this->currMainNode;
        }
 
@@ -156,7 +156,7 @@ class ImageTemplateEngine extends BaseTemplateEngine implements CompileableTempl
         *
         * @return      $mainNodes      Array with valid main node names
         */
-       public final function getMainNodes () {
+       public final function getMainNodes (): array {
                return $this->mainNodes;
        }
 
@@ -165,7 +165,7 @@ class ImageTemplateEngine extends BaseTemplateEngine implements CompileableTempl
         *
         * @return      $subNodes       Array with valid sub node names
         */
-       public final function getSubNodes () {
+       public final function getSubNodes (): array {
                return $this->subNodes;
        }
 
@@ -175,7 +175,7 @@ class ImageTemplateEngine extends BaseTemplateEngine implements CompileableTempl
         * @param       $imageInstance  An instance of an image
         * @return      void
         */
-       public final function setImageInstance (BaseImage $imageInstance) {
+       public final function setImageInstance (BaseImage $imageInstance): void {
                $this->imageInstance = $imageInstance;
        }
 
@@ -184,7 +184,7 @@ class ImageTemplateEngine extends BaseTemplateEngine implements CompileableTempl
         *
         * @return      $imageInstance  An instance of an image
         */
-       public final function getImageInstance () {
+       public final function getImageInstance (): BaseImage {
                return $this->imageInstance;
        }
 
@@ -276,7 +276,7 @@ class ImageTemplateEngine extends BaseTemplateEngine implements CompileableTempl
         * @return      void
         * @todo        Add cache creation here
         */
-       private function initImage () {
+       private function initImage (): void {
                // Unfinished work!
        }
 
@@ -286,7 +286,7 @@ class ImageTemplateEngine extends BaseTemplateEngine implements CompileableTempl
         * @param       $imageType      Code fragment or direct value holding the image type
         * @return      void
         */
-       private function setImageType (string $imageType) {
+       private function setImageType (string $imageType): void {
                // Set group to general
                $this->setVariableGroup('general');
 
@@ -309,7 +309,7 @@ class ImageTemplateEngine extends BaseTemplateEngine implements CompileableTempl
         *
         * @return      void
         */
-       private function setImageResolution () {
+       private function setImageResolution (): void {
                // Call the image class
                $this->getImageInstance()->initResolution();
 
@@ -323,7 +323,7 @@ class ImageTemplateEngine extends BaseTemplateEngine implements CompileableTempl
         * @return      void
         * @see         ImageTemplateEngine::setImageResolution
         */
-       private function setImageBase () {
+       private function setImageBase (): void {
                // Call the image class
                $this->getImageInstance()->initBase();
 
@@ -337,7 +337,7 @@ class ImageTemplateEngine extends BaseTemplateEngine implements CompileableTempl
         * @return      void
         * @see         ImageTemplateEngine::setImageResolution
         */
-       private function setImageBackgroundColor () {
+       private function setImageBackgroundColor (): void {
                // Call the image class
                $this->getImageInstance()->initBackgroundColor();
 
@@ -351,7 +351,7 @@ class ImageTemplateEngine extends BaseTemplateEngine implements CompileableTempl
         * @return      void
         * @see         ImageTemplateEngine::setImageResolution
         */
-       private function setImageForegroundColor () {
+       private function setImageForegroundColor (): void {
                // Call the image class
                $this->getImageInstance()->initForegroundColor();
 
@@ -366,7 +366,7 @@ class ImageTemplateEngine extends BaseTemplateEngine implements CompileableTempl
         * @return      void
         * @see         ImageTemplateEngine::setImageResolution
         */
-       private function setImageImageString (string $groupable = 'single') {
+       private function setImageImageString (string $groupable = 'single'): void {
                // Call the image class
                $this->getImageInstance()->initImageString($groupable);
 
@@ -380,7 +380,7 @@ class ImageTemplateEngine extends BaseTemplateEngine implements CompileableTempl
         * @param       $imageName      Name of the image
         * @return      void
         */
-       private function setImagePropertyName (string $imageName) {
+       private function setImagePropertyName (string $imageName): void {
                // Call the image class
                $this->getImageInstance()->setImageName($imageName);
        }
@@ -391,7 +391,7 @@ class ImageTemplateEngine extends BaseTemplateEngine implements CompileableTempl
         * @param       $width  Width of the image or variable
         * @return      void
         */
-       private function setImagePropertyWidth (int $width) {
+       private function setImagePropertyWidth (int $width): void {
                // Call the image class
                $this->getImageInstance()->setWidth($width);
        }
@@ -402,7 +402,7 @@ class ImageTemplateEngine extends BaseTemplateEngine implements CompileableTempl
         * @param       $height Height of the image or variable
         * @return      void
         */
-       private function setImagePropertyHeight (int $height) {
+       private function setImagePropertyHeight (int $height): void {
                // Call the image class
                $this->getImageInstance()->setHeight($height);
        }
@@ -413,7 +413,7 @@ class ImageTemplateEngine extends BaseTemplateEngine implements CompileableTempl
         * @param       $red    Red color value
         * @return      void
         */
-       private function setImagePropertyRed ($red) {
+       private function setImagePropertyRed ($red): void {
                // Call the image class
                $this->getImageInstance()->setRed($red);
        }
@@ -424,7 +424,7 @@ class ImageTemplateEngine extends BaseTemplateEngine implements CompileableTempl
         * @param       $green  Green color value
         * @return      void
         */
-       private function setImagePropertyGreen ($green) {
+       private function setImagePropertyGreen ($green): void {
                // Call the image class
                $this->getImageInstance()->setGreen($green);
        }
@@ -435,7 +435,7 @@ class ImageTemplateEngine extends BaseTemplateEngine implements CompileableTempl
         * @param       $blue   Blue color value
         * @return      void
         */
-       private function setImagePropertyBlue ($blue) {
+       private function setImagePropertyBlue ($blue): void {
                // Call the image class
                $this->getImageInstance()->setBlue($blue);
        }
@@ -446,7 +446,7 @@ class ImageTemplateEngine extends BaseTemplateEngine implements CompileableTempl
         * @param       $stringName             String name (identifier)
         * @return      void
         */
-       private function setImagePropertyStringName (string $stringName) {
+       private function setImagePropertyStringName (string $stringName): void {
                // Call the image class
                $this->getImageInstance()->setStringName($stringName);
        }
@@ -457,7 +457,7 @@ class ImageTemplateEngine extends BaseTemplateEngine implements CompileableTempl
         * @param       $fontSize       Size of the font
         * @return      void
         */
-       private function setImagePropertyFontSize (int $fontSize) {
+       private function setImagePropertyFontSize (int $fontSize): void {
                // Call the image class
                $this->getImageInstance()->setFontSize($fontSize);
        }
@@ -468,7 +468,7 @@ class ImageTemplateEngine extends BaseTemplateEngine implements CompileableTempl
         * @param       $imageString    Image string to set
         * @return      void
         */
-       private function setImagePropertyText (string $imageString) {
+       private function setImagePropertyText (string $imageString): void {
                // Call the image class
                $this->getImageInstance()->setString($imageString);
        }
@@ -479,7 +479,7 @@ class ImageTemplateEngine extends BaseTemplateEngine implements CompileableTempl
         * @param       $x      X coordinate
         * @return      void
         */
-       private function setImagePropertyX (int $x) {
+       private function setImagePropertyX (int $x): void {
                // Call the image class
                $this->getImageInstance()->setX($x);
        }
@@ -490,7 +490,7 @@ class ImageTemplateEngine extends BaseTemplateEngine implements CompileableTempl
         * @param       $y      Y coordinate
         * @return      void
         */
-       private function setImagePropertyY (int $y) {
+       private function setImagePropertyY (int $y): void {
                // Call the image class
                $this->getImageInstance()->setY($y);
        }
@@ -500,7 +500,7 @@ class ImageTemplateEngine extends BaseTemplateEngine implements CompileableTempl
         *
         * @return      $fileInstance   An instance of a SplFileInfo class
         */
-       public function getImageCacheFile () {
+       public function getImageCacheFile (): SplFileInfo {
                // Get the instance ready
                $fileInstance = new SplFileInfo(sprintf('%s%s%s/%s.%s',
                        FrameworkBootstrap::getConfigurationInstance()->getConfigEntry('root_base_path'),
@@ -523,7 +523,7 @@ class ImageTemplateEngine extends BaseTemplateEngine implements CompileableTempl
         * @return      void
         * @todo        Nothing to really "transfer" here?
         */
-       public function transferToResponse (Responseable $responseInstance) {
+       public function transferToResponse (Responseable $responseInstance): void {
                // Set the image instance
                $responseInstance->setImageInstance($this->getImageInstance());
        }
@@ -535,7 +535,7 @@ class ImageTemplateEngine extends BaseTemplateEngine implements CompileableTempl
         *                                              located in 'image' by default
         * @return      void
         */
-       public function loadImageTemplate (string $template) {
+       public function loadImageTemplate (string $template): void {
                // Set template type
                $this->setTemplateType(FrameworkBootstrap::getConfigurationInstance()->getConfigEntry('image_template_type'));
 
index 5315ef7177b52ce9f5c36d2133f16d8f5bdaa627..d3e8a3097662e8c988f12b8c9317f2c7a713a5cf 100644 (file)
@@ -112,7 +112,7 @@ abstract class BaseXmlTemplateEngine extends BaseTemplateEngine implements Compi
         *
         * @param       $typePrefix                             Type prefix
         * @param       $xmlTemplateType                Type of XML template
-        * @return      $templateInstance               An instance of TemplateEngine
+        * @return      void
         * @throws      InvalidArgumentException        If a parameter has an invalid value
         * @throws      BasePathIsEmptyException                If the provided $templateBasePath is empty
         * @throws      InvalidBasePathStringException  If $templateBasePath is no string
@@ -121,7 +121,7 @@ abstract class BaseXmlTemplateEngine extends BaseTemplateEngine implements Compi
         * @throws      BasePathReadProtectedException  If $templateBasePath is
         *                                                                                      read-protected
         */
-       protected function initXmlTemplateEngine (string $typePrefix, string $xmlTemplateType) {
+       protected function initXmlTemplateEngine (string $typePrefix, string $xmlTemplateType): void {
                // Check on parameter
                /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->traceMessage(sprintf('BASE-XML-TEMPLATE-ENGINE: typePrefix=%s,xmlTemplateType=%s - CALLED!', $typePrefix, $xmlTemplateType));
                if (empty($typePrefix)) {
@@ -201,7 +201,7 @@ abstract class BaseXmlTemplateEngine extends BaseTemplateEngine implements Compi
         * @param       $templateName   Optional name of template
         * @return      void
         */
-       public function loadXmlTemplate (string $templateName = '') {
+       public function loadXmlTemplate (string $templateName = ''): void {
                // Is the template name empty?
                /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->traceMessage(sprintf('BASE-XML-TEMPLATE-ENGINE: templateName=%s - CALLED!', $templateName));
                if (empty($templateName)) {
@@ -226,7 +226,7 @@ abstract class BaseXmlTemplateEngine extends BaseTemplateEngine implements Compi
         *
         * @return      $currMainNode   Current main node
         */
-       public final function getCurrMainNode () {
+       public final function getCurrMainNode (): string {
                return $this->curr['main_node'];
        }
 
@@ -234,9 +234,9 @@ abstract class BaseXmlTemplateEngine extends BaseTemplateEngine implements Compi
         * Setter for current main node
         *
         * @param       $element                Element name to set as current main node
-        * @return      $currMainNode   Current main node
+        * @return      void
         */
-       private function setCurrMainNode (string $element) {
+       private function setCurrMainNode (string $element): void {
                $this->curr['main_node'] = $element;
        }
 
@@ -245,7 +245,7 @@ abstract class BaseXmlTemplateEngine extends BaseTemplateEngine implements Compi
         *
         * @return      $mainNodes      Array with valid main node names
         */
-       public final function getMainNodes () {
+       public final function getMainNodes (): array {
                return $this->mainNodes;
        }
 
@@ -254,7 +254,7 @@ abstract class BaseXmlTemplateEngine extends BaseTemplateEngine implements Compi
         *
         * @return      $stackerName    Name of stacker of this class
         */
-       protected final function getStackerName () {
+       protected final function getStackerName (): string {
                return $this->stackerName;
        }
 
@@ -264,7 +264,7 @@ abstract class BaseXmlTemplateEngine extends BaseTemplateEngine implements Compi
         * @param       $subNodes       Array with valid sub node names
         * @return      void
         */
-       public final function setSubNodes (array $subNodes) {
+       public final function setSubNodes (array $subNodes): void {
                $this->subNodes = $subNodes;
        }
 
@@ -273,7 +273,7 @@ abstract class BaseXmlTemplateEngine extends BaseTemplateEngine implements Compi
         *
         * @return      $subNodes       Array with valid sub node names
         */
-       public final function getSubNodes () {
+       public final function getSubNodes (): array {
                return $this->subNodes;
        }
 
@@ -284,7 +284,7 @@ abstract class BaseXmlTemplateEngine extends BaseTemplateEngine implements Compi
         * @param       $key    Key to read from
         * @return      $value  Value from variable
         */
-       public function readXmlData (string $key) {
+       public function readXmlData (string $key): mixed {
                // Is key parameter valid?
                /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->traceMessage(sprintf('BASE-XML-TEMPLATE-ENGINE: key=%s - CALLED!', $key));
                if (empty($key)) {
index 237b2337821157ae7e2a133f93afb440dd49d80f..c0d60645fc896b496982af0df495c514e7459832 100644 (file)
@@ -41,7 +41,7 @@ interface HandleableDataSet extends Handleable {
        /**
         * Getter for handler name
         *
-        * @return<>$handlerNameName of this handler
+        * @return      $handlerName    Name of this handler
         */
        function getHandlerName (): string;
 
index 4d33ffee2576de38b74a9639c4af3ad8865f2c6a..1d0fd552874393ac13afff0cd62ffb6d2b3a64e6 100644 (file)
@@ -29,6 +29,14 @@ use Org\Mxchange\CoreFramework\Template\CompileableTemplate;
  */
 interface CompileableXmlTemplate extends CompileableTemplate {
 
+       /**
+        * Load a specified XML template into the engine
+        *
+        * @param       $templateName   Optional name of template
+        * @return      void
+        */
+       function loadXmlTemplate (string $templateName = ''): void;
+
        /**
         * Renders the given XML content
         *
@@ -61,4 +69,18 @@ interface CompileableXmlTemplate extends CompileableTemplate {
         */
        function compactContent (string $uncompactedContent): string;
 
+       /**
+        * Getter for current main node
+        *
+        * @return      $currMainNode   Current main node
+        */
+       function getCurrMainNode (): string;
+
+       /**
+        * Getter for main node array
+        *
+        * @return      $mainNodes      Array with valid main node names
+        */
+       function getMainNodes (): array;
+
 }