TextGeneratorFactory   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 7
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 1
eloc 3
dl 0
loc 7
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A create() 0 4 1
1
<?php
2
namespace DBFaker\Generators;
3
4
use DBFaker\Helpers\SchemaHelper;
5
use Doctrine\DBAL\Schema\Column;
6
use Doctrine\DBAL\Schema\Table;
7
8
class TextGeneratorFactory implements FakeDataGeneratorFactoryInterface
9
{
10
11
    public function create(Table $table, Column $column, SchemaHelper $schemaHelper) : FakeDataGeneratorInterface
12
    {
13
        $unique = $schemaHelper->isColumnPartOfUniqueIndex($table, $column);
14
        return new TextGenerator($column, $unique);
15
    }
16
}
17