* @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;
}
/**
* @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();
* @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();
* @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();