Skip to content

Commit

Permalink
Change check order
Browse files Browse the repository at this point in the history
  • Loading branch information
francoism90 committed Feb 23, 2024
1 parent feda214 commit e8b6491
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/Discover.php
Original file line number Diff line number Diff line change
Expand Up @@ -142,13 +142,13 @@ public function useReflection(?string $basePath = null, ?string $rootNamespace =
/** @return array<DiscoveredStructure>|array<string> */
public function get(): array
{
if ($this->config->shouldUseCache()) {
return $this->config->cacheDriver->has($this->config->cacheId)
? $this->config->cacheDriver->get($this->config->cacheId)
: $this->cache();
if (! $this->config->shouldUseCache()) {
return $this->getWithoutCache();
}

return $this->getWithoutCache();
return $this->config->cacheDriver->has($this->config->cacheId)
? $this->config->cacheDriver->get($this->config->cacheId)
: $this->cache();
}

/** @return array<DiscoveredStructure>|array<string> */
Expand Down

0 comments on commit e8b6491

Please sign in to comment.