Bootstrap   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 12
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 3

Importance

Changes 0
Metric Value
wmc 1
lcom 0
cbo 3
dl 0
loc 12
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A createRegistry() 0 8 1
1
<?php
2
3
namespace Vivait\TenantBundle;
4
5
use Vivait\TenantBundle\Locator\TenantLocator;
6
use Vivait\TenantBundle\Provider\TenantProvider;
7
use Vivait\TenantBundle\Registry\TenantRegistry;
8
9
class Bootstrap {
10
11
    public static function createRegistry(TenantProvider $provider, TenantLocator $locator) {
12
        // Populate the tenants from the provider
13
        $registry = new TenantRegistry($provider->loadTenants());
14
15
        $registry->setCurrent( $registry->get($locator->getTenant()) );
16
17
        return $registry;
18
    }
19
20
}
21