Completed
Pull Request — master (#30)
by Christian
02:15
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 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 6
ccs 3
cts 3
cp 1
rs 9.4285
cc 1
eloc 3
nc 1
nop 0
crap 1
1
<?php
2
3
namespace uuf6429\ElderBrother\Change;
4
5
use Symfony\Component\Finder\Iterator\RecursiveDirectoryIterator as SfyRecursiveDirectoryIterator;
6
7
class RecursiveDirectoryIterator extends SfyRecursiveDirectoryIterator
8
{
9
    /**
10
     * Return an instance of SplFileInfo with support for relative paths.
11
     *
12
     * @return FileInfo
13
     */
14 18
    public function current()
15
    {
16 18
        $result = parent::current();
17
18 18
        return new FileInfo($result->getRealPath(), $result->getRelativePath(), $result->getRelativePathname());
19
    }
20
}
21