BlobGeneratorFactory   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 25
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 2
eloc 4
dl 0
loc 25
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 3 1
A create() 0 3 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 BlobGeneratorFactory implements FakeDataGeneratorFactoryInterface
9
{
10
    /**
11
     * @var string
12
     */
13
    private $globExpression;
14
15
    /**
16
     * ComplexObjectGenerator constructor.
17
     * @param string $globExpression
18
     */
19
    public function __construct(string $globExpression)
20
    {
21
        $this->globExpression= $globExpression;
22
    }
23
24
    /**
25
     * @param Table $table
26
     * @param Column $column
27
     * @param SchemaHelper $helper
28
     * @return FakeDataGeneratorInterface
29
     */
30
    public function create(Table $table, Column $column, SchemaHelper $helper): FakeDataGeneratorInterface
31
    {
32
        return new BlobGenerator($this->globExpression, $column);
33
    }
34
}
35