]> git.mxchange.org Git - core.git/blobdiff - framework/main/classes/helper/class_BaseHelper.php
Continued:
[core.git] / framework / main / classes / helper / class_BaseHelper.php
index d594489e878dc82652095f575d7fed0100662a1a..994988e59efa96f70fedeebb72d2f03124e3d049 100644 (file)
@@ -97,8 +97,8 @@ abstract class BaseHelper extends BaseFrameworkSystem {
         * @param       $newContent             New content to add
         * @return      void
         */
-       protected final function addContent ($newContent) {
-               $this->content .= (string) trim($newContent) . PHP_EOL;
+       protected final function addContent (string $newContent) {
+               $this->content .= trim($newContent) . PHP_EOL;
        }
 
        /**
@@ -107,9 +107,9 @@ abstract class BaseHelper extends BaseFrameworkSystem {
         * @param       $content        Content to to the base
         * @return      void
         */
-       protected function addHeaderContent ($content) {
+       protected function addHeaderContent (string $content) {
                // Add the header content
-               $this->groups['header']['content'] = (string) trim($content);
+               $this->groups['header']['content'] = trim($content);
        }
 
        /**
@@ -118,9 +118,9 @@ abstract class BaseHelper extends BaseFrameworkSystem {
         * @param       $content        Content to to the base
         * @return      void
         */
-       protected function addFooterContent ($content) {
+       protected function addFooterContent (string $content) {
                // Add the footer content
-               $this->groups['footer']['content'] = (string) trim($content);
+               $this->groups['footer']['content'] = trim($content);
        }
 
        /**
@@ -131,7 +131,7 @@ abstract class BaseHelper extends BaseFrameworkSystem {
         * @param       $newContent             New content to add
         * @return      void
         */
-       protected final function addContentToPreviousGroup ($newContent) {
+       protected final function addContentToPreviousGroup (string $newContent) {
                // Check for sub/group
                if ($this->ifSubGroupOpenedPreviously()) {
                        // Get sub group id
@@ -176,7 +176,7 @@ abstract class BaseHelper extends BaseFrameworkSystem {
         * @param       $fieldName      Name of the field to assign
         * @return      void
         */
-       public function assignField ($fieldName) {
+       public function assignField (string $fieldName) {
                // Get the value from value instance
                $fieldValue = $this->getValueField($fieldName);
 
@@ -254,7 +254,7 @@ abstract class BaseHelper extends BaseFrameworkSystem {
         * @return      void
         * @throws      HelperGroupAlreadyCreatedException      If the group was already created before
         */
-       protected function openGroupByIdContent ($groupId, $content, $tag) {
+       protected function openGroupByIdContent (string $groupId, string $content, string $tag) {
                //* DEBUG: */ echo "OPEN:groupId={$groupId},content=<pre>".htmlentities($content)."</pre>\n";
                // Is the group already there?
                if (isset($this->groups[$groupId])) {
@@ -289,7 +289,7 @@ abstract class BaseHelper extends BaseFrameworkSystem {
         * @return      void
         * @throws      HelperNoPreviousOpenedGroupException    If no previously opened group was found
         */
-       public function closePreviousGroupByContent ($content = '') {
+       public function closePreviousGroupByContent (string $content = '') {
                // Check if any sub group was opened before
                if ($this->ifSubGroupOpenedPreviously()) {
                        // Close it automatically
@@ -341,7 +341,7 @@ abstract class BaseHelper extends BaseFrameworkSystem {
         * @return      void
         * @throws      HelperSubGroupAlreadyCreatedException   If the sub group was already created before
         */
-       protected function openSubGroupByIdContent ($subGroupId, $content, $tag) {
+       protected function openSubGroupByIdContent (string $subGroupId, string $content, string $tag) {
                //* DEBUG: */ echo "OPEN:subGroupId={$subGroupId},content=".htmlentities($content)."<br />\n";
                // Is the group already there?
                if (isset($this->subGroups[$subGroupId])) {
@@ -370,7 +370,7 @@ abstract class BaseHelper extends BaseFrameworkSystem {
         * @return      void
         * @throws      HelperNoPreviousOpenedSubGroupException If no previously opened sub group was found
         */
-       public function closePreviousSubGroupByContent ($content = '') {
+       public function closePreviousSubGroupByContent (string $content = '') {
                // Check if any sub group was opened before
                if ($this->ifSubGroupOpenedPreviously() === false) {
                        // Then throw an exception
@@ -450,7 +450,7 @@ abstract class BaseHelper extends BaseFrameworkSystem {
         * @param       $groupId        Id of group to check
         * @return      $isOpened       Whether the specified group is open
         */
-       protected function ifGroupIsOpened ($groupId) {
+       protected function ifGroupIsOpened (string $groupId) {
                // Is the group open?
                $isOpened = ((isset($this->groups[$groupId])) && ($this->groups[$groupId]['opened'] === true));
 
@@ -465,7 +465,7 @@ abstract class BaseHelper extends BaseFrameworkSystem {
         * @return      $fieldValue             Value from field
         * @throws      NullPointerException    Thrown if $valueInstance is null
         */
-       public function getValueField ($fieldName) {
+       public function getValueField (string $fieldName) {
                // Init value
                $fieldValue = NULL;
 
@@ -537,8 +537,8 @@ abstract class BaseHelper extends BaseFrameworkSystem {
         * @param       $previousGroupId        Id of previously opened group
         * @return      void
         */
-       protected final function setPreviousGroupId ($previousGroupId) {
-               $this->previousGroupId = (string) $previousGroupId;
+       protected final function setPreviousGroupId (string $previousGroupId) {
+               $this->previousGroupId = $previousGroupId;
        }
 
        /**
@@ -556,8 +556,8 @@ abstract class BaseHelper extends BaseFrameworkSystem {
         * @param       $previousSubGroupId             Id of previously opened sub group
         * @return      void
         */
-       protected final function setPreviousSubGroupId ($previousSubGroupId) {
-               $this->previousSubGroupId = (string) $previousSubGroupId;
+       protected final function setPreviousSubGroupId (string $previousSubGroupId) {
+               $this->previousSubGroupId = $previousSubGroupId;
        }
 
 }