Conditions | 1 |
Paths | 1 |
Total Lines | 9 |
Code Lines | 4 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
31 | public function getSoundingPitch(VibratingString $string): float |
||
32 | { |
||
33 | // Transpose the half-stop onto the new string length, which was formed |
||
34 | // by the stop. |
||
35 | $pseudoString = new VibratingString($string->getStoppedFrequency($this->baseStop)); |
||
36 | $pseudoHalfStop = $this->halfStop / $this->baseStop; |
||
37 | |||
38 | return $pseudoString->getHarmonicSoundingFrequency($pseudoHalfStop); |
||
39 | } |
||
40 | |||
72 |
Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.
You can also find more detailed suggestions in the “Code” section of your repository.