Skip to content

Commit

Permalink
Changes preg_split to explode for phpstan.
Browse files Browse the repository at this point in the history
  • Loading branch information
typhonius committed Oct 14, 2020
1 parent bbd27e6 commit a6ac614
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/Cli/CloudApi.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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;
Expand Down

0 comments on commit a6ac614

Please sign in to comment.