]> git.mxchange.org Git - core.git/blobdiff - framework/main/middleware/database/class_DatabaseConnection.php
Refacuring:
[core.git] / framework / main / middleware / database / class_DatabaseConnection.php
index 60ffaf11776376ee3e9505363da96dd5414b643f..7e01bc05c79f6b165d822c7008860e27038ce999 100644 (file)
@@ -102,12 +102,12 @@ class DatabaseConnection extends BaseMiddleware implements DatabaseConnector, Re
         * @param       $host   Host to connect to (default: 127.0.0.1)
         * @return      void
         */
-       public final function setConnectionData ($login, $pass, $dbase, $host = '127.0.0.1') {
+       public final function setConnectionData (string $login, string $pass, string $dbase, string $host = '127.0.0.1') {
                // Transfer connection data
-               $this->connectData['login'] = (string) $login;
-               $this->connectData['pass']  = (string) $pass;
-               $this->connectData['dbase'] = (string) $dbase;
-               $this->connectData['host']  = (string) $host;
+               $this->connectData['login'] = $login;
+               $this->connectData['pass']  = $pass;
+               $this->connectData['dbase'] = $dbase;
+               $this->connectData['host']  = $host;
        }
 
        /**
@@ -145,7 +145,7 @@ class DatabaseConnection extends BaseMiddleware implements DatabaseConnector, Re
         * @param       $criteriaInstance       An instance of a Criteria class
         * @return      $result                         The result as an array
         */
-       public function doSelectByTableCriteria ($tableName, Criteria $criteriaInstance) {
+       public function doSelectByTableCriteria (string $tableName, Criteria $criteriaInstance) {
                // Connect to the database
                $this->dbLayer->connectToDatabase();
 
@@ -200,7 +200,7 @@ class DatabaseConnection extends BaseMiddleware implements DatabaseConnector, Re
         * @param       $tableName              Name of table we need the primary key column from
         * @return      $primaryKey             Primary key column of requested table
         */
-       public function getPrimaryKeyOfTable ($tableName) {
+       public function getPrimaryKeyOfTable (string $tableName) {
                // Connect to the database
                $this->dbLayer->connectToDatabase();
 
@@ -235,7 +235,7 @@ class DatabaseConnection extends BaseMiddleware implements DatabaseConnector, Re
         * @param       $tableName      Table name
         * @return      $count          Total row count
         */
-       public function countTotalRows ($tableName) {
+       public function countTotalRows (string $tableName) {
                // Connect to the database
                $this->dbLayer->connectToDatabase();