From 67bfb20e963239e555c17befed9ba09f68488a16 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Samuel=20=C5=A0tancl?= Date: Mon, 16 Sep 2019 16:59:18 +0200 Subject: [PATCH] Unique ID generator 'handle' -> 'generate' --- src/Contracts/UniqueIdentifierGenerator.php | 2 +- src/Tenant.php | 2 +- src/UUIDGenerator.php | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Contracts/UniqueIdentifierGenerator.php b/src/Contracts/UniqueIdentifierGenerator.php index ddc5af11..0dd40eb5 100644 --- a/src/Contracts/UniqueIdentifierGenerator.php +++ b/src/Contracts/UniqueIdentifierGenerator.php @@ -13,5 +13,5 @@ interface UniqueIdentifierGenerator * @param array $data * @return string */ - public static function handle(array $domains, array $data = []): string; + public static function generate(array $domains, array $data = []): string; } diff --git a/src/Tenant.php b/src/Tenant.php index 7af3e8a4..2169edfb 100644 --- a/src/Tenant.php +++ b/src/Tenant.php @@ -141,7 +141,7 @@ class Tenant implements ArrayAccess public function generateId() { - $this->id = $this->idGenerator->handle($this->domains, $this->data); + $this->id = $this->idGenerator->generate($this->domains, $this->data); } public function save(): self diff --git a/src/UUIDGenerator.php b/src/UUIDGenerator.php index 80af66dc..7497c78a 100644 --- a/src/UUIDGenerator.php +++ b/src/UUIDGenerator.php @@ -8,7 +8,7 @@ use Stancl\Tenancy\Contracts\UniqueIdentifierGenerator; class UUIDGenerator implements UniqueIdentifierGenerator { - public static function handle(array $domains, array $data = []): string + public static function generate(array $domains, array $data = []): string { return (string) \Webpatser\Uuid\Uuid::generate(1, $domains[0] ?? ''); }