TextGeneratorFactory::create()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
eloc 2
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 3
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