Completed
Push — master ( 2095ba...9a6e4e )
by Patrick
02:15
created

InstrumentString::getPhysicalLength()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 0
1
<?php
2
3
declare(strict_types = 1);
4
5
namespace ExtendedStrings\Strings;
6
7
class InstrumentString extends VibratingString implements InstrumentStringInterface
8
{
9
    private $physicalLength;
10
    private $number;
11
12
    public function __construct(float $frequency, float $physicalLength, int $number)
13
    {
14
        $this->number = $number;
15
        $this->physicalLength = $physicalLength;
16
17
        parent::__construct($frequency);
18
    }
19
20
    /**
21
     * {@inheritdoc}
22
     */
23
    public function getNumber(): int
24
    {
25
        return $this->number;
26
    }
27
28
    /**
29
     * {@inheritdoc}
30
     */
31
    public function getPhysicalLength(): float
32
    {
33
        return $this->physicalLength;
34
    }
35
}
36