| Conditions | 3 |
| Paths | 2 |
| Total Lines | 13 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 43 | public function __construct(string $name, float $volume = 1.0, bool $critical = false) |
||
| 44 | { |
||
| 45 | if ($volume < 0 || $volume > 1) { |
||
| 46 | throw new \InvalidArgumentException(\sprintf( |
||
| 47 | 'Invalid volume %.2f. Must be between 0.0 and 1.0', |
||
| 48 | $volume |
||
| 49 | )); |
||
| 50 | } |
||
| 51 | |||
| 52 | $this->name = $name; |
||
| 53 | $this->volume = $volume; |
||
| 54 | $this->critical = $critical; |
||
| 55 | } |
||
| 56 | |||
| 87 |