| 1 | <?php |
||
| 19 | class Sound |
||
| 20 | { |
||
| 21 | /** |
||
| 22 | * @var bool |
||
| 23 | */ |
||
| 24 | private $critical; |
||
| 25 | |||
| 26 | /** |
||
| 27 | * @var string |
||
| 28 | */ |
||
| 29 | private $name; |
||
| 30 | |||
| 31 | /** |
||
| 32 | * @var float |
||
| 33 | */ |
||
| 34 | private $volume; |
||
| 35 | |||
| 36 | /** |
||
| 37 | * Constructor. |
||
| 38 | * |
||
| 39 | * @param string $name |
||
| 40 | * @param float|int $volume |
||
| 41 | * @param bool $critical |
||
| 42 | */ |
||
| 43 | public function __construct(string $name, float $volume = 1.0, bool $critical = false) |
||
| 56 | |||
| 57 | /** |
||
| 58 | * Is critical? |
||
| 59 | * |
||
| 60 | * @return bool |
||
| 61 | */ |
||
| 62 | public function isCritical(): bool |
||
| 66 | |||
| 67 | /** |
||
| 68 | * Get the name of volume |
||
| 69 | * |
||
| 70 | * @return string |
||
| 71 | */ |
||
| 72 | public function getName(): string |
||
| 76 | |||
| 77 | /** |
||
| 78 | * Get the volume |
||
| 79 | * |
||
| 80 | * @return float |
||
| 81 | */ |
||
| 82 | public function getVolume(): float |
||
| 86 | } |
||
| 87 |