Zones::getZones()   A
last analyzed

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 ValuesIterator implements ZonesInterface, ZonesProviderInterface
6
{
7
    use SearchableTrait;
8
9
    public $unit = 'zone';
10
11
    /**
12
     * @inheritDoc
13
     * @return $this
14
     */
15 9
    public function getZones() : ZonesInterface
16
    {
17 9
        return $this;
18
    }
19
20
21
    /**
22
     * @inheritDoc
23
     * @return Exposures
24
     */
25 18
    public function getExposures() : ExposuresInterface
26
    {
27
        return new Exposures( array_map( function( $zone ) {
28 18
            return $zone * log10(2);
29 18
        }, $this->getArrayCopy()));
30
    }
31
}
32