Test Setup Failed
Push — master ( 656577...88aaf0 )
by Carsten
03:37
created

Exposures   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 27
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 3
lcom 0
cbo 2
dl 0
loc 27
ccs 4
cts 4
cp 1
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 MinMaxArrayIterator implements ExposuresInterface, ExposuresProviderInterface
6
{
7
8
    use SearchableTrait;
9
10
    /**
11
     * @inheritDoc
12 12
     * @return $this
13
     */
14 12
    public function getExposures() : ExposuresInterface
15
    {
16
        return $this;
17
    }
18
19
    /**
20 12
     * @inheritDoc
21
     *
22 12
     * 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
    public function getRange( float $step = null) : \SplFixedArray
26
    {
27
        $step = is_null($step) ? (log10(2) / 3) : $step;
28
        return parent::getRange( $step );
29
    }
30
31
}
32