Continued:
authorRoland Häder <roland@mxchange.org>
Sat, 7 Nov 2020 12:03:48 +0000 (13:03 +0100)
committerRoland Häder <roland@mxchange.org>
Sat, 7 Nov 2020 12:03:48 +0000 (13:03 +0100)
- added type-hints for primitive variables

Signed-off-by: Roland Häder <roland@mxchange.org>
application/tests/class_ApplicationHelper.php
framework/main/interfaces/application/class_ManageableApplication.php

index 8eab367f3f7fa74d1d4578682733ef109bd7b0bb..7559e433f17485a725f8c83316cc482c45c24d93 100644 (file)
@@ -110,9 +110,9 @@ class ApplicationHelper extends BaseApplication implements ManageableApplication
         * @param       $appVersion     The application's version number
         * @return      void
         */
-       public final function setAppVersion ($appVersion) {
+       public final function setAppVersion (string $appVersion) {
                // Cast and set it
-               $this->appVersion = (string) $appVersion;
+               $this->appVersion = $appVersion;
        }
 
        /**
@@ -130,9 +130,9 @@ class ApplicationHelper extends BaseApplication implements ManageableApplication
         * @param       $appName        The application's human-readable name
         * @return      void
         */
-       public final function setAppName ($appName) {
+       public final function setAppName (string $appName) {
                // Cast and set it
-               $this->appName = (string) $appName;;
+               $this->appName = $appName;;
        }
 
        /**
@@ -150,7 +150,7 @@ class ApplicationHelper extends BaseApplication implements ManageableApplication
         * @param       $shortName      The application's short uni*-like name
         * @return      void
         */
-       public final function setAppShortName ($shortName) {
+       public final function setAppShortName (string $shortName) {
                // Cast and set it
                $this->shortName = (string) $shortName;
        }
index ec1f6aa16740beeedb8a6372c70cbb41826b3d0c..c5a7bc961f364c77b7e9fd0fcb27dba644706f05 100644 (file)
@@ -34,6 +34,51 @@ use Org\Mxchange\CoreFramework\Template\CompileableTemplate;
  * along with this program. If not, see <http://www.gnu.org/licenses/>.
  */
 interface ManageableApplication extends FrameworkInterface {
+       /**
+        * Getter for the version number
+        *
+        * @return      $appVersion     The application's version number
+        */
+       function getAppVersion ();
+
+       /**
+        * Setter for the version number
+        *
+        * @param       $appVersion     The application's version number
+        * @return      void
+        */
+       function setAppVersion (string $appVersion);
+
+       /**
+        * Getter for human-readable name
+        *
+        * @return      $appName        The application's human-readable name
+        */
+       function getAppName ();
+
+       /**
+        * Setter for human-readable name
+        *
+        * @param       $appName        The application's human-readable name
+        * @return      void
+        */
+       function setAppName (string $appName);
+
+       /**
+        * Getter for short uni*-like name
+        *
+        * @return      $shortName      The application's short uni*-like name
+        */
+       function getAppShortName ();
+
+       /**
+        * Setter for short uni*-like name
+        *
+        * @param       $shortName      The application's short uni*-like name
+        * @return      void
+        */
+       function setAppShortName (string $shortName);
+
        /**
         * 1) Setups application data
         *
@@ -69,7 +114,7 @@ interface ManageableApplication extends FrameworkInterface {
         *
         * @return      $masterTemplateName             Name of the master template
         */
-       function buildMasterTemplateName();
+       function buildMasterTemplateName ();
 
        /**
         * Assigns extra application-depending data