From 07e8eaf32e62b81abba9de202434b100d1c4788a Mon Sep 17 00:00:00 2001 From: Thiago Damas Date: Mon, 18 Sep 2017 22:12:47 -0300 Subject: [PATCH] solve issue 91 --- src/Identity/v3/Models/Endpoint.php | 2 ++ src/Identity/v3/Models/Service.php | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/Identity/v3/Models/Endpoint.php b/src/Identity/v3/Models/Endpoint.php index 36e11909..0629d578 100644 --- a/src/Identity/v3/Models/Endpoint.php +++ b/src/Identity/v3/Models/Endpoint.php @@ -77,6 +77,8 @@ public function delete() public function regionMatches(string $value): bool { + if($this->region == '*') + return true; return $this->region && $this->region == $value; } diff --git a/src/Identity/v3/Models/Service.php b/src/Identity/v3/Models/Service.php index c8f95794..284df4d5 100644 --- a/src/Identity/v3/Models/Service.php +++ b/src/Identity/v3/Models/Service.php @@ -79,7 +79,7 @@ private function nameMatches(string $value): bool private function typeMatches(string $value): bool { - return $this->type && $this->type = $value; + return $this->type && $this->type == $value; } /** @@ -94,7 +94,7 @@ private function typeMatches(string $value): bool */ public function getUrl(string $name, string $type, string $region, string $interface) { - if (!$this->nameMatches($name) || !$this->typeMatches($type)) { + if (!$this->nameMatches($name) && !$this->typeMatches($type)) { return false; }