Completed
Pull Request — 2.x (#402)
by
unknown
02:06
created

NormalizeIterator::current()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 9

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
dl 0
loc 9
ccs 0
cts 7
cp 0
rs 9.9666
c 0
b 0
f 0
cc 1
nc 1
nop 0
crap 2
1
<?php
2
3
/*
4
 * Go! AOP framework
5
 *
6
 * @copyright Copyright 2015, Lisachenko Alexander <[email protected]>
7
 *
8
 * This source file is subject to the license that is bundled
9
 * with this source code in the file LICENSE.
10
 */
11
12
namespace Go\Instrument\FileSystem;
13
14
use IteratorIterator;
15
16
/**
17
 *
18
 */
19
final class NormalizeIterator extends IteratorIterator
20
{
21
22
    /**
23
     * @return SplFileInfo
24
     */
25
    public function current()
26
    {
27
        /* @var $symfonyFileInfo \Symfony\Component\Finder\SplFileInfo */
28
        $symfonyFileInfo = parent::current();
29
        $originalPath = $symfonyFileInfo->getPathname();
30
        $newPath = str_replace(DIRECTORY_SEPARATOR, '/', $originalPath);
31
32
        return new SplFileInfo($newPath);
33
    }
34
}
35