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

Exposures::getRange()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 5

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 3
CRAP Score 2

Importance

Changes 0
Metric Value
dl 0
loc 5
ccs 3
cts 3
cp 1
rs 10
c 0
b 0
f 0
cc 2
nc 2
nop 1
crap 2
1
<?php
2
namespace FilmTools\Commons;
3
4
5
class Exposures extends MinMaxArrayIterator implements ExposuresInterface, ExposuresProviderInterface
6
{
7
8
    use SearchableTrait;
9
10
    /**
11
     * @inheritDoc
12
     * @return $this
13
     */
14
    public function getExposures() : ExposuresInterface
15
    {
16
        return $this;
17
    }
18
19
    /**
20
     * @inheritDoc
21
     *
22
     * The range step width used here is a third of `log10(2) = 0.301...`.
23
     * The numbers will most likely cleanly round to multiples of 0.1 though.
24
     */
25 6
    public function getRange( float $step = null) : \SplFixedArray
26
    {
27 6
        $step = is_null($step) ? (log10(2) / 3) : $step;
28 6
        return parent::getRange( $step );
29
    }
30
31
}
32