Exposures   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 29
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Test Coverage

Coverage 60%

Importance

Changes 0
Metric Value
wmc 3
lcom 0
cbo 2
dl 0
loc 29
ccs 3
cts 5
cp 0.6
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A getExposures() 0 4 1
A getRange() 0 5 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