Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 75a42fa

Browse files
committedJan 7, 2025
rename method consistent with other eloquent method names
1 parent a0e81f8 commit 75a42fa

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed
 

‎src/GeneratesUuid.php

+3-6
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ public function resolveUuidVersion(): string
122122
*/
123123
public function scopeWhereUuid($query, $uuid, $uuidColumn = null): Builder
124124
{
125-
$uuidColumn = $this->guessUuidColumn($uuidColumn);
125+
$uuidColumn = $this->getUuidColumn($uuidColumn);
126126
$uuid = $this->prepareUuid($uuid, $uuidColumn);
127127

128128
return $query->whereIn(
@@ -140,7 +140,7 @@ public function scopeWhereUuid($query, $uuid, $uuidColumn = null): Builder
140140
*/
141141
public function scopeWhereNotUuid($query, $uuid, $uuidColumn = null): Builder
142142
{
143-
$uuidColumn = $this->guessUuidColumn($uuidColumn);
143+
$uuidColumn = $this->getUuidColumn($uuidColumn);
144144
$uuid = $this->prepareUuid($uuid, $uuidColumn);
145145

146146
return $query->whereNotIn(
@@ -185,14 +185,12 @@ protected function normaliseUuids($uuid): array
185185
return $uuid;
186186
}
187187

188-
189188
/**
190189
* Guess UUID column based on model configurations or given uuid column
191190
*
192191
* @param ?string $uuidColumn
193-
* @return string
194192
*/
195-
protected function guessUuidColumn($uuidColumn = null): string
193+
protected function getUuidColumn($uuidColumn = null): string
196194
{
197195
return ! is_null($uuidColumn) && in_array($uuidColumn, $this->uuidColumns())
198196
? $uuidColumn
@@ -204,7 +202,6 @@ protected function guessUuidColumn($uuidColumn = null): string
204202
*
205203
* @param string|array $uuid
206204
* @param string $uuidColumn
207-
* @return string|array
208205
*/
209206
protected function prepareUuid($uuid, $uuidColumn): array|string
210207
{

0 commit comments

Comments
 (0)
Please sign in to comment.