diff --git a/src/DB/Codeigniter4Adapter.php b/src/DB/Codeigniter4Adapter.php index bcc8504..eb2fe22 100644 --- a/src/DB/Codeigniter4Adapter.php +++ b/src/DB/Codeigniter4Adapter.php @@ -86,7 +86,7 @@ public function makeQueryString(string $query, ColumnCollection $columns): strin * @param $query * @return string */ - public function getQueryString($query) + public function getQueryString($query): string { if ($query instanceof \CodeIgniter\Database\BaseBuilder) { return $query->getCompiledSelect(); diff --git a/src/DB/DBAdapter.php b/src/DB/DBAdapter.php index eeddeb6..0b7d05e 100644 --- a/src/DB/DBAdapter.php +++ b/src/DB/DBAdapter.php @@ -98,7 +98,7 @@ public function makeLimitString(int $take, int $skip) * @param $query * @return string */ - public function getQueryString($query) + public function getQueryString($query): string { return $query; } diff --git a/src/DB/DatabaseInterface.php b/src/DB/DatabaseInterface.php index 6490ee9..183701a 100644 --- a/src/DB/DatabaseInterface.php +++ b/src/DB/DatabaseInterface.php @@ -74,4 +74,10 @@ public function makeOrderByString(array $o); * @return mixed */ public function makeLimitString(int $take, int $skip); + + /** + * @param $query + * @return string + */ + public function getQueryString($query): string; } diff --git a/src/DB/LaravelAdapter.php b/src/DB/LaravelAdapter.php index c69e3f8..c2ca3a9 100644 --- a/src/DB/LaravelAdapter.php +++ b/src/DB/LaravelAdapter.php @@ -71,7 +71,7 @@ public function escape($string, Query $query) * @param $query * @return string */ - public function getQueryString($query) + public function getQueryString($query): string { if ($query instanceof \Illuminate\Database\Eloquent\Builder) { return vsprintf(str_replace('?', '%s', $query->toSql()), diff --git a/src/Datatables.php b/src/Datatables.php index e9d70e2..9c309c9 100644 --- a/src/Datatables.php +++ b/src/Datatables.php @@ -180,7 +180,7 @@ public function hide(string $column, $searchable = false): Datatables } /** - * @param string $query + * @param mixed $query * @return Datatables */ public function query($query): Datatables