Completed
Push — master ( 881c2b...54c447 )
by Carsten
02:35
created

FStops::getFStops()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 4
ccs 2
cts 2
cp 1
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
crap 1
1
<?php
2
namespace FilmTools\Commons;
3
4
5
class FStops extends MinMaxArrayIterator implements FStopsInterface, FStopsProviderInterface
6
{
7
    use SearchableTrait;
8
9
    /**
10
     * @inheritDoc
11
     * @return $this
12
     */
13 9
    public function getFStops() : FStopsInterface
14
    {
15 9
        return $this;
16
    }
17
18
19
    /**
20
     * @inheritDoc
21
     */
22 18
    public function getZones() : ZonesInterface
23
    {
24 18
        $min = $this->min();
25
        return new Zones( array_map( function( $fstop ) use ($min) {
26 18
            return $fstop + ($min * -1);
27 18
        }, $this->getArrayCopy()));
28
    }
29
30
31
    /**
32
     * @inheritDoc
33
     * @return ExposuresInterface
34
     */
35 9
    public function getExposures() : ExposuresInterface
36
    {
37 9
        return $this->getZones()->getExposures();
38
    }
39
}
40