TenantFactory   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 14
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 0

Importance

Changes 2
Bugs 1 Features 0
Metric Value
wmc 2
c 2
b 1
f 0
lcom 1
cbo 0
dl 0
loc 14
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A createNew() 0 4 1
1
<?php
2
3
namespace Tahoe\Bundle\MultiTenancyBundle\Factory;
4
5
6
class TenantFactory
7
{
8
    private $class;
9
10
    public function __construct($class)
11
    {
12
        $this->class = $class;
13
    }
14
15
    public function createNew()
16
    {
17
        return new $this->class;
18
    }
19
}