Conditions | 3 |
Paths | 3 |
Total Lines | 9 |
Code Lines | 5 |
Lines | 0 |
Ratio | 0 % |
Tests | 4 |
CRAP Score | 3.072 |
Changes | 0 |
1 | <?php |
||
28 | 3 | public function generateIntId(string $entity, bool $increment): int |
|
29 | { |
||
30 | 3 | if ($increment) { |
|
31 | 3 | $this->ids[$entity] = isset($this->ids[$entity]) ? ++$this->ids[$entity] : 1; |
|
32 | } else { |
||
33 | $this->ids[$entity] = $this->faker->unique()->numberBetween(0,100); |
||
34 | } |
||
35 | |||
36 | 3 | return $this->ids[$entity]; |
|
37 | } |
||
48 |