Skip to content

Commit

Permalink
Merge pull request #97 from n1crack/dev
Browse files Browse the repository at this point in the history
fix types
  • Loading branch information
n1crack authored Apr 15, 2024
2 parents 2655426 + 013b6ba commit ca24a2c
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/DB/Codeigniter4Adapter.php
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
2 changes: 1 addition & 1 deletion src/DB/DBAdapter.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
6 changes: 6 additions & 0 deletions src/DB/DatabaseInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
2 changes: 1 addition & 1 deletion src/DB/LaravelAdapter.php
Original file line number Diff line number Diff line change
Expand Up @@ -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()),
Expand Down
2 changes: 1 addition & 1 deletion src/Datatables.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit ca24a2c

Please sign in to comment.