]> git.mxchange.org Git - core.git/blobdiff - framework/main/classes/request/class_BaseRequest.php
Continued:
[core.git] / framework / main / classes / request / class_BaseRequest.php
index 56ff6b06d0e9c3a8d7adbb024a4cffedb5467222..d70fe58e7cfadf82de51c0b4a2e9f27397c134b4 100644 (file)
@@ -10,11 +10,7 @@ use Org\Mxchange\CoreFramework\Object\BaseFrameworkSystem;
  *
  * @author             Roland Haeder <webmaster@shipsimu.org>
  * @version            0.0.0
-<<<<<<< HEAD:framework/main/classes/request/class_BaseRequest.php
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2017 Core Developer Team
-=======
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2016 Core Developer Team
->>>>>>> Some updates::inc/main/classes/request/class_BaseRequest.php
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2021 Core Developer Team
  * @license            GNU GPL 3.0 or any newer version
  * @link               http://www.shipsimu.org
  *
@@ -35,7 +31,7 @@ abstract class BaseRequest extends BaseFrameworkSystem {
        /**
         * Array for the request data
         */
-       private $requestData = array();
+       private $requestData = [];
 
        /**
         * Whether this request is valid and can be further processed. The default is
@@ -50,7 +46,7 @@ abstract class BaseRequest extends BaseFrameworkSystem {
         * @param       $className      Name of the class
         * @return      void
         */
-       protected function __construct ($className) {
+       protected function __construct (string $className) {
                // Call parent constructor
                parent::__construct($className);
        }
@@ -60,7 +56,7 @@ abstract class BaseRequest extends BaseFrameworkSystem {
         * @param       $element        Name of the request element we want to check
         * @return      $isSet          Whether the request element is set
         */
-       public function isRequestElementSet ($element) {
+       public function isRequestElementSet (string $element) {
                // Is this element found?
                $isSet = isset($this->requestData[$element]);
 
@@ -75,7 +71,7 @@ abstract class BaseRequest extends BaseFrameworkSystem {
         * @return      $value          Value of the found request element or 'null' if the
         *                                              element was not found
         */
-       public function getRequestElement ($element) {
+       public function getRequestElement (string $element) {
                // Initialize value
                $value = NULL;
 
@@ -86,7 +82,7 @@ abstract class BaseRequest extends BaseFrameworkSystem {
 
                        // Secure it against attacks
                        $value = htmlentities(strip_tags($value), ENT_QUOTES);
-               } // END - if
+               }
 
                // Return the element's value
                return $value;
@@ -99,7 +95,7 @@ abstract class BaseRequest extends BaseFrameworkSystem {
         * @param       $value          Value to set
         * @return      void
         */
-       public function setRequestElement ($element, $value) {
+       public function setRequestElement (string $element, $value) {
                $this->requestData[$element] = $value;
        }
 
@@ -128,8 +124,8 @@ abstract class BaseRequest extends BaseFrameworkSystem {
         * @param       $isValid        Whether the request is valid
         * @return      void
         */
-       public final function requestIsValid ($isValid = true) {
-               $this->requestIsValid = (bool) $isValid;
+       public final function requestIsValid (bool $isValid = true) {
+               $this->requestIsValid = $isValid;
        }
 
        /**