DateIntervalGeneratorFactory   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 14
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 1
eloc 3
dl 0
loc 14
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 DateIntervalGeneratorFactory implements FakeDataGeneratorFactoryInterface
9
{
10
11
    /**
12
     * @param Table $table
13
     * @param Column $column
14
     * @param SchemaHelper $schemaHelper
15
     * @return FakeDataGeneratorInterface
16
     *
17
     */
18
    public function create(Table $table, Column $column, SchemaHelper $schemaHelper) : FakeDataGeneratorInterface
19
    {
20
        $unique = $schemaHelper->isColumnPartOfUniqueIndex($table, $column);
21
        return new DateIntervalGenerator($unique);
22
    }
23
}
24