Completed
Pull Request — master (#30)
by Christian
06:42
created

RecursiveDirectoryIterator::current()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 3
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 6
ccs 3
cts 3
cp 1
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 3
nc 1
nop 0
crap 1
1
<?php
2
3
namespace uuf6429\ElderBrother\Change\Iterator;
4
5
use Symfony\Component\Finder\Iterator\RecursiveDirectoryIterator as SfyRecursiveDirectoryIterator;
6
use uuf6429\ElderBrother\Change\FileInfo;
7
8
class RecursiveDirectoryIterator extends SfyRecursiveDirectoryIterator
9
{
10
    /**
11
     * @return FileInfo
12
     */
13 22
    public function current()
14
    {
15 22
        $result = parent::current();
16
17 22
        return new FileInfo($result->getRealPath(), $result->getRelativePath(), $result->getRelativePathname());
18
    }
19
}
20