Skip to content

Commit

Permalink
rename method consistent with other eloquent method names
Browse files Browse the repository at this point in the history
  • Loading branch information
michaeldyrynda committed Jan 7, 2025
1 parent a0e81f8 commit 75a42fa
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions src/GeneratesUuid.php
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ public function resolveUuidVersion(): string
*/
public function scopeWhereUuid($query, $uuid, $uuidColumn = null): Builder
{
$uuidColumn = $this->guessUuidColumn($uuidColumn);
$uuidColumn = $this->getUuidColumn($uuidColumn);
$uuid = $this->prepareUuid($uuid, $uuidColumn);

return $query->whereIn(
Expand All @@ -140,7 +140,7 @@ public function scopeWhereUuid($query, $uuid, $uuidColumn = null): Builder
*/
public function scopeWhereNotUuid($query, $uuid, $uuidColumn = null): Builder
{
$uuidColumn = $this->guessUuidColumn($uuidColumn);
$uuidColumn = $this->getUuidColumn($uuidColumn);
$uuid = $this->prepareUuid($uuid, $uuidColumn);

return $query->whereNotIn(
Expand Down Expand Up @@ -185,14 +185,12 @@ protected function normaliseUuids($uuid): array
return $uuid;
}


/**
* Guess UUID column based on model configurations or given uuid column
*
* @param ?string $uuidColumn
* @return string
*/
protected function guessUuidColumn($uuidColumn = null): string
protected function getUuidColumn($uuidColumn = null): string
{
return ! is_null($uuidColumn) && in_array($uuidColumn, $this->uuidColumns())
? $uuidColumn
Expand All @@ -204,7 +202,6 @@ protected function guessUuidColumn($uuidColumn = null): string
*
* @param string|array $uuid
* @param string $uuidColumn
* @return string|array
*/
protected function prepareUuid($uuid, $uuidColumn): array|string
{
Expand Down

0 comments on commit 75a42fa

Please sign in to comment.