Completed
Push — master ( 7b220e...d0f73c )
by Patrick
08:53
created

VibratingString::getHarmonicSoundingFrequency()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 6
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 3
nc 1
nop 1
1
<?php
2
3
declare(strict_types = 1);
4
5
namespace ExtendedStrings\Strings;
6
7
class VibratingString implements VibratingStringInterface
8
{
9
    private $frequency;
10
11
    /**
12
     * VibratingString constructor.
13
     *
14
     * @param float $frequency The open string frequency (in Hz).
15
     */
16
    public function __construct(float $frequency)
17
    {
18
        $this->frequency = $frequency;
19
    }
20
21
    /**
22
     * Returns the frequency of the open string (in Hz).
23
     *
24
     * @return float
25
     */
26
    public function getFrequency(): float
27
    {
28
        return $this->frequency;
29
    }
30
}
31