Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/ORM/HasAll.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
*/
trait HasAll
{
public static function all(string $columns = '*'): Builder
public static function all(string $columns = '*'): array
{
return Facades\DB::table(static::table())->select($columns)->toArray();
}
Expand Down
2 changes: 1 addition & 1 deletion src/ORM/HasFind.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
*/
trait HasFind
{
public static function find(int $id, string $columns = '*')
public static function find(int $id, string $columns = '*'): array
{
return DB::table(static::table())->select($columns)->where('id', '=', $id)->toArray();
}
Expand Down
2 changes: 1 addition & 1 deletion src/ORM/HasFirst.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
*/
trait HasFirst
{
public static function first(string $columns = '*')
public static function first(string $columns = '*'): array
{
return DB::table(static::table())->select($columns)->orderBy('id', 'ASC')->limit(1);
}
Expand Down
2 changes: 1 addition & 1 deletion src/ORM/HasJoin.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
*/
trait HasJoin
{
public static function join(string $table, array $on, string $columns = '*')
public static function join(string $table, array $on, string $columns = '*'): array
{
return DB::table(static::table())->join($table, $on, $columns)->toArray();
}
Expand Down
2 changes: 1 addition & 1 deletion src/ORM/HasLast.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
*/
trait HasLast
{
public static function last(string $columns = '*')
public static function last(string $columns = '*'): array
{
return DB::table(static::table())->select($columns)->orderBy('id', 'DESC')->limit(1)->toArray();
}
Expand Down
2 changes: 1 addition & 1 deletion src/ORM/HasLike.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
*/
trait HasLike
{
public static function like(string $field, string $pattern, string $columns = '*'): Builder
public static function like(string $field, string $pattern, string $columns = '*'): array
{
return DB::table(static::table())->select($columns)->like($field, $pattern)->toArray();
}
Expand Down
2 changes: 1 addition & 1 deletion src/ORM/HasNot.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
*/
trait HasNot
{
public static function whereNot($key = null, $value = null, string $columns = '*')
public static function whereNot($key = null, $value = null, string $columns = '*'): array
{
return DB::table(static::table())->select($columns)->whereNot($key, $value)->toArray();
}
Expand Down
2 changes: 1 addition & 1 deletion src/ORM/HasWhere.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
*/
trait HasWhere
{
public static function where($key, $is = null, $value = null, string $columns = '*')
public static function where($key, $is = null, $value = null, string $columns = '*'): array
{
return DB::table(static::table())->select($columns)->where($key, $is, $value)->toArray();
}
Expand Down