FilmSpeedAbstract::getIso()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 7

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
dl 0
loc 7
ccs 0
cts 4
cp 0
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
crap 2
1
<?php
2
namespace FilmTools\FilmSpeed;
3
4
abstract class FilmSpeedAbstract implements FilmSpeedInterface
5
{
6
7
    /**
8
     * @var float
9
     */
10
    protected $din;
11
12
13
    /**
14
     * @var float
15
     */
16
    protected $asa;
17
18
19
    /**
20
     * @inheritDoc
21
     */
22 44
    public function getDin() : float
23
    {
24 44
        return $this->din;
25
    }
26
27
28
    /**
29
     * @inheritDoc
30
     */
31 44
    public function getAsa() : float
32
    {
33 44
        return $this->asa;
34
    }
35
36
37
    /**
38
     * @inheritDoc
39
     */
40
    public function getIso( ) : string
41
    {
42
        $din = $this->getDin( );
43
        $asa = $this->getAsa( );
44
45
        return sprintf("ISO %s/%s°", $asa, $din);
46
    }
47
48
}
49