Skip to content

Commit

Permalink
Simplified logic
Browse files Browse the repository at this point in the history
  • Loading branch information
davidbyoung committed Jul 17, 2023
1 parent 75dd204 commit 0d17e35
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions src/GlobalModule.php
Original file line number Diff line number Diff line change
Expand Up @@ -121,10 +121,6 @@ private function getBinderDispatcher(): IBinderDispatcher
$cache = new FileBinderMetadataCollectionCache($cachePath);
$this->container->bindInstance(IBinderMetadataCollectionCache::class, $cache);

if (\getenv('APP_ENV') === 'production') {
return new LazyBinderDispatcher($cache);
}

return new LazyBinderDispatcher();
return new LazyBinderDispatcher(\getenv('APP_ENV') === 'production' ? $cache : null);
}
}

0 comments on commit 0d17e35

Please sign in to comment.