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

Zones   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 25
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 3

Test Coverage

Coverage 100%

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A getZones() 0 4 1
A getExposures() 0 6 1
1
<?php
2
namespace FilmTools\Commons;
3
4
5
class Zones extends MinMaxArrayIterator implements ZonesInterface, ZonesProviderInterface
6
{
7
    use SearchableTrait;
8
9
    /**
10
     * @inheritDoc
11
     * @return $this
12
     */
13 9
    public function getZones() : ZonesInterface
14
    {
15 9
        return $this;
16
    }
17
18
19
    /**
20
     * @inheritDoc
21
     * @return Exposures
22
     */
23 18
    public function getExposures() : ExposuresInterface
24
    {
25
        return new Exposures( array_map( function( $zone ) {
26 18
            return $zone * log10(2);
27 18
        }, $this->getArrayCopy()));
28
    }
29
}
30