Completed
Push — master ( c4ada7...915e39 )
by Matthew
01:55
created

ConfigIterator   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 9
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 2
eloc 5
c 1
b 0
f 0
dl 0
loc 9
ccs 5
cts 5
cp 1
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A current() 0 7 2
1
<?php
2
3
declare(strict_types=1);
4
5
namespace PublishingKit\Config;
6
7
use ArrayIterator;
8
9
final class ConfigIterator extends ArrayIterator
10
{
11 3
    public function current()
12
    {
13 3
        $result = parent::current();
14 3
        if (is_array($result)) {
15 3
            return new Config($result);
16
        }
17 3
        return $result;
18
    }
19
}
20