Passed
Push — master ( 41ea25...e47858 )
by Carsten
03:42
created

Zones::getZones()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 4
ccs 2
cts 2
cp 1
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
crap 1
1
<?php
2
namespace FilmTools\Commons;
3
4
5
class Zones extends MinMaxArrayIterator implements ZonesInterface, ZonesProviderInterface
6
{
7
    /**
8
     * @inheritDoc
9
     * @return $this
10
     */
11 9
    public function getZones() : ZonesInterface
12
    {
13 9
        return $this;
14
    }
15
16
    /**
17
     * @inheritDoc
18
     * @return Exposures
19
     */
20
    public function getExposures() : ExposuresInterface
21
    {
22 9
        return new Exposures( array_map( function( $zone ) {
23 9
            return $zone * log10(2);
24 9
        }, $this->getArrayCopy()));
25
    }
26
}
27