Total Complexity | 2 |
Total Lines | 18 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 0 |
1 | <?php |
||
11 | class Chance |
||
12 | { |
||
13 | /** @var CalculationStrategyInterface */ |
||
14 | protected $strategy; |
||
15 | |||
16 | 4 | public function __construct($value) |
|
17 | { |
||
18 | 4 | $this->strategy = (new StrategyFactory)->create($value); |
|
19 | 4 | } |
|
20 | |||
21 | /** |
||
22 | * Расчитываем вероятность |
||
23 | * |
||
24 | * @return bool |
||
25 | */ |
||
26 | 2 | public function get(): bool |
|
29 | } |
||
30 | } |
||
31 |