Exposures::getExposures()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

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