Skip to content

Commit

Permalink
Merge pull request #536 from misaf/patch-1
Browse files Browse the repository at this point in the history
Refactor registerTenantFinder method to reduce complexity
  • Loading branch information
masterix21 authored Jun 13, 2024
2 parents 15c3f05 + 57da182 commit 593df73
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/Multitenancy.php
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,10 @@ protected function registerTasksCollection(): self

protected function registerTenantFinder(): self
{
if ($this->app['config']->get('multitenancy.tenant_finder')) {
$this->app->bind(TenantFinder::class, $this->app['config']->get('multitenancy.tenant_finder'));
$tenantFinderConfig = $this->app['config']->get('multitenancy.tenant_finder');

if ($tenantFinderConfig) {
$this->app->bind(TenantFinder::class, $tenantFinderConfig);
}

return $this;
Expand Down

0 comments on commit 593df73

Please sign in to comment.