diff --git a/system/Database/BaseBuilder.php b/system/Database/BaseBuilder.php index d62bca882fd6..fe2becf3823d 100644 --- a/system/Database/BaseBuilder.php +++ b/system/Database/BaseBuilder.php @@ -1024,7 +1024,7 @@ protected function _like($field, string $match = '', string $type = 'AND ', stri * * @return string $like_statement */ - public function _like_statement(string $prefix = null, string $column, string $not = null, string $bind, bool $insensitiveSearch = false): string + protected function _like_statement(string $prefix = null, string $column, string $not = null, string $bind, bool $insensitiveSearch = false): string { $like_statement = "{$prefix} {$column} {$not} LIKE :{$bind}:"; diff --git a/system/Database/BaseConnection.php b/system/Database/BaseConnection.php index c278568f1e33..295c24ba310f 100644 --- a/system/Database/BaseConnection.php +++ b/system/Database/BaseConnection.php @@ -1247,7 +1247,7 @@ public function protectIdentifiers($item, bool $prefixSingle = false, bool $prot * * This function escapes column and table names * - * @param mixed + * @param mixed $item * * @return mixed */ @@ -1442,7 +1442,7 @@ public function escapeString($str, bool $like = false) * specific escaping for LIKE conditions * * @param string|string[] - * @return mixed + * @return string|string[] */ public function escapeLikeString($str) { @@ -1507,11 +1507,11 @@ public function callFunction(string $functionName, ...$params): bool /** * Returns an array of table names * - * @param boolean $constrain_by_prefix = FALSE + * @param boolean $constrainByPrefix = FALSE * @return boolean|array * @throws \CodeIgniter\Database\Exceptions\DatabaseException */ - public function listTables(bool $constrain_by_prefix = false) + public function listTables(bool $constrainByPrefix = false) { // Is there a cached result? if (isset($this->dataCache['table_names']) && $this->dataCache['table_names']) @@ -1519,7 +1519,7 @@ public function listTables(bool $constrain_by_prefix = false) return $this->dataCache['table_names']; } - if (false === ($sql = $this->_listTables($constrain_by_prefix))) + if (false === ($sql = $this->_listTables($constrainByPrefix))) { if ($this->DBDebug) { @@ -1567,12 +1567,12 @@ public function listTables(bool $constrain_by_prefix = false) /** * Determine if a particular table exists * - * @param string $table_name + * @param string $tableName * @return boolean */ - public function tableExists(string $table_name): bool + public function tableExists(string $tableName): bool { - return in_array($this->protectIdentifiers($table_name, true, false, false), $this->listTables()); + return in_array($this->protectIdentifiers($tableName, true, false, false), $this->listTables()); } //-------------------------------------------------------------------- diff --git a/system/Entity.php b/system/Entity.php index 6a7472a55f93..504cc81ca5ce 100644 --- a/system/Entity.php +++ b/system/Entity.php @@ -40,6 +40,7 @@ use CodeIgniter\I18n\Time; use CodeIgniter\Exceptions\CastException; +use CodeIgniter\Exceptions\EntityException; /** * Entity encapsulation, for use with CodeIgniter\Model