| 1 | <?php  | 
            ||
| 9 | abstract class InstrumentBase implements InstrumentInterface  | 
            ||
| 10 | { | 
            ||
| 11 | protected $defaultStopLength;  | 
            ||
| 12 | |||
| 13 | private $stringFrequencies = [];  | 
            ||
| 14 | private $stopLength;  | 
            ||
| 15 | |||
| 16 | /**  | 
            ||
| 17 | * Violin constructor.  | 
            ||
| 18 | *  | 
            ||
| 19 | * @param array|null $stringFrequencies  | 
            ||
| 20 | * @param float $stopLength  | 
            ||
| 21 | */  | 
            ||
| 22 | public function __construct(array $stringFrequencies = null, float $stopLength = null)  | 
            ||
| 36 | |||
| 37 | /**  | 
            ||
| 38 | * @return string[] The default strings of the instrument, as note names  | 
            ||
| 39 | * (e.g. 'A4', 'D3').  | 
            ||
| 40 | */  | 
            ||
| 41 | abstract protected function getDefaultNames(): array;  | 
            ||
| 42 | |||
| 43 | /**  | 
            ||
| 44 | * @return float The default stop length of the instrument (mm).  | 
            ||
| 45 | */  | 
            ||
| 46 | abstract protected function getDefaultStopLength(): float;  | 
            ||
| 47 | |||
| 48 | /**  | 
            ||
| 49 |      * {@inheritdoc} | 
            ||
| 50 | */  | 
            ||
| 51 | public function getStringFrequencies(): array  | 
            ||
| 55 | |||
| 56 | /**  | 
            ||
| 57 |      * {@inheritdoc} | 
            ||
| 58 | */  | 
            ||
| 59 | public function getStopLength(): float  | 
            ||
| 63 | }  | 
            ||
| 64 |