diff --git a/src/Cli/CloudApi.php b/src/Cli/CloudApi.php index 5c21b57..8612bfe 100644 --- a/src/Cli/CloudApi.php +++ b/src/Cli/CloudApi.php @@ -92,9 +92,9 @@ public function getEnvironment($uuid, $environment) $cache = new FilesystemAdapter('acquiacli'); $return = $cache->get($cacheId, function (ItemInterface $item) { - $splitId = preg_split('/\./', $item->getKey()); - $uuid = $splitId[1]; - $environment = $splitId[2]; + $split = explode('.', $item->getKey()); + $uuid = $split[1]; + $environment = $split[2]; $item->expiresAfter(300); $environmentsAdapter = new Environments($this->client); @@ -106,7 +106,7 @@ public function getEnvironment($uuid, $environment) } } - throw new \Exception('Unable to find environment from environment name'); + throw new \Exception('Unable to find environment from environment name.'); }); return $return;