Conditions | 1 |
Paths | 1 |
Total Lines | 10 |
Code Lines | 6 |
Lines | 0 |
Ratio | 0 % |
Tests | 0 |
CRAP Score | 2 |
Changes | 0 |
1 | <?php declare(strict_types=1); |
||
20 | public function __invoke() |
||
21 | { |
||
22 | $unitHighestKey = count(WeightEmbeddableInterface::VALID_UNITS) - 1; |
||
23 | $unitKey = $this->generator->numberBetween(0, $unitHighestKey); |
||
24 | $embeddable = new WeightEmbeddable( |
||
25 | WeightEmbeddableInterface::VALID_UNITS[$unitKey], |
||
26 | $this->generator->randomFloat() |
||
27 | ); |
||
28 | |||
29 | return $embeddable; |
||
30 | } |
||
31 | } |