diff --git a/src/Concerns/ManagesMutations.php b/src/Concerns/ManagesMutations.php index 1832e27c..7615db6b 100644 --- a/src/Concerns/ManagesMutations.php +++ b/src/Concerns/ManagesMutations.php @@ -37,7 +37,7 @@ abstract protected function getDatabaseContext(): Database|Transaction; /** * @param string $table - * @param array $dataSet + * @param list>|array $dataSet * @return void */ public function insertUsingMutation(string $table, array $dataSet) @@ -51,7 +51,7 @@ public function insertUsingMutation(string $table, array $dataSet) /** * @param string $table - * @param array $dataSet + * @param list>|array $dataSet * @return void */ public function updateUsingMutation(string $table, array $dataSet) @@ -65,7 +65,7 @@ public function updateUsingMutation(string $table, array $dataSet) /** * @param string $table - * @param array $dataSet + * @param list>|array $dataSet * @return void */ public function insertOrUpdateUsingMutation(string $table, array $dataSet) @@ -109,8 +109,8 @@ protected function withTransactionEvents(callable $mutationCall) } /** - * @param array $dataSet - * @return array + * @param list>|array $dataSet + * @return list> */ protected function prepareForMutation(array $dataSet): array { @@ -122,6 +122,7 @@ protected function prepareForMutation(array $dataSet): array $dataSet = [$dataSet]; } + /** @var list> $dataSet */ foreach ($dataSet as $index => $values) { foreach ($values as $name => $value) { if ($value instanceof DateTimeInterface) { diff --git a/src/Events/MutatingData.php b/src/Events/MutatingData.php index fca68d05..a20b2b47 100644 --- a/src/Events/MutatingData.php +++ b/src/Events/MutatingData.php @@ -33,7 +33,7 @@ class MutatingData extends ConnectionEvent public $command; /** - * @var array + * @var list> */ public $values; @@ -41,7 +41,7 @@ class MutatingData extends ConnectionEvent * @param Connection $connection * @param string $tableName * @param string $command - * @param array $values + * @param list> $values */ public function __construct($connection, string $tableName, string $command, array $values) { diff --git a/src/Query/Concerns/UsesMutations.php b/src/Query/Concerns/UsesMutations.php index 56f11522..5f33c78b 100644 --- a/src/Query/Concerns/UsesMutations.php +++ b/src/Query/Concerns/UsesMutations.php @@ -26,7 +26,7 @@ trait UsesMutations { /** - * @param array $values + * @param list>|array $values * @return void */ public function insertUsingMutation(array $values) @@ -35,7 +35,7 @@ public function insertUsingMutation(array $values) } /** - * @param array $values + * @param list>|array $values * @return void */ public function updateUsingMutation(array $values) @@ -44,7 +44,7 @@ public function updateUsingMutation(array $values) } /** - * @param array $values + * @param list>|array $values * @return void */ public function insertOrUpdateUsingMutation(array $values)