GeneratorUnit::setGenerationSeed()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 3
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 4
c 0
b 0
f 0
ccs 3
cts 3
cp 1
rs 10
cc 1
nc 1
nop 1
crap 1
1
<?php
2
3
namespace Maketok\DataMigration\Unit\Type;
4
5
use Maketok\DataMigration\Unit\GenerateUnitInterface;
6
7
abstract class GeneratorUnit extends ExportFileUnit implements GenerateUnitInterface
8
{
9
    /**
10
     * @var array
11
     */
12
    protected $generatorMapping;
13
    /**
14
     * @var array
15
     */
16
    protected $generationContributions = [];
0 ignored issues
show
Comprehensibility Naming introduced by
The variable name $generationContributions exceeds the maximum configured length of 20.

Very long variable names usually make code harder to read. It is therefore recommended not to make variable names too verbose.

Loading history...
17
    /**
18
     * Max number and center of dispersion
19
     * @var \SplFixedArray
20
     */
21
    protected $generationSeed;
22
23
    /**
24
     * @param string $code
25
     */
26 55
    public function __construct($code)
27
    {
28 55
        parent::__construct($code);
29 55
        $this->generationSeed = new \SplFixedArray(2);
30 55
        $this->generationSeed[0] = 1;
31 55
        $this->generationSeed[1] = 1;
32 55
    }
33
34
    /**
35
     * {@inheritdoc}
36
     */
37 6
    public function getGeneratorMapping()
38
    {
39 6
        return $this->generatorMapping;
40
    }
41
42
    /**
43
     * {@inheritdoc}
44
     */
45 5
    public function setGeneratorMapping(array $generatorMapping)
46
    {
47 5
        $this->generatorMapping = $generatorMapping;
48 5
    }
49
50
    /**
51
     * {@inheritdoc}
52
     */
53 5
    public function getGenerationSeed()
54
    {
55 5
        return $this->generationSeed;
56
    }
57
58
    /**
59
     * {@inheritdoc}
60
     */
61 6
    public function setGenerationSeed(\SplFixedArray $generationSeed)
62
    {
63 6
        $this->generationSeed = $generationSeed;
64 6
    }
65
66
    /**
67
     * {@inheritdoc}
68
     */
69 5
    public function getGenerationContributions()
70
    {
71 5
        return $this->generationContributions;
72
    }
73
74
    /**
75
     * {@inheritdoc}
76
     */
77
    public function setGenerationContributions(array $generationContributions)
0 ignored issues
show
Comprehensibility Naming introduced by
The variable name $generationContributions exceeds the maximum configured length of 20.

Very long variable names usually make code harder to read. It is therefore recommended not to make variable names too verbose.

Loading history...
78
    {
79
        $this->generationContributions = $generationContributions;
80
    }
81
}
82