Skip to content
This repository was archived by the owner on Aug 22, 2023. It is now read-only.

Commit 4c89fe9

Browse files
committed
Precise mixed types when possible
1 parent 5e43591 commit 4c89fe9

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

src/Eloquent/Casts/BinaryUuid.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ public function get($model, string $key, $value, array $attributes)
4646
* @param string $key
4747
* @param mixed $value
4848
* @param array $attributes
49-
* @return mixed
49+
* @return Binary
5050
*/
5151
public function set($model, string $key, $value, array $attributes)
5252
{

src/Query/Builder.php

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -788,9 +788,9 @@ public function raw($expression = null)
788788
/**
789789
* Append one or more values to an array.
790790
*
791-
* @param mixed $column
792-
* @param mixed $value
793-
* @param bool $unique
791+
* @param string|array $column
792+
* @param mixed $value
793+
* @param bool $unique
794794
* @return int
795795
*/
796796
public function push($column, $value = null, $unique = false)
@@ -818,14 +818,14 @@ public function push($column, $value = null, $unique = false)
818818
/**
819819
* Remove one or more values from an array.
820820
*
821-
* @param mixed $column
822-
* @param mixed $value
821+
* @param string|array $column
822+
* @param mixed $value
823823
* @return int
824824
*/
825825
public function pull($column, $value = null)
826826
{
827827
// Check if we passed an associative array.
828-
$batch = (is_array($value) && array_keys($value) === range(0, count($value) - 1));
828+
$batch = is_array($value) && array_is_list($value);
829829

830830
// If we are pulling multiple values, we need to use $pullAll.
831831
$operator = $batch ? '$pullAll' : '$pull';
@@ -842,7 +842,7 @@ public function pull($column, $value = null)
842842
/**
843843
* Remove one or more fields.
844844
*
845-
* @param mixed $columns
845+
* @param string|string[] $columns
846846
* @return int
847847
*/
848848
public function drop($columns)

0 commit comments

Comments
 (0)