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

NormalizeIterator   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 16
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
wmc 1
lcom 0
cbo 2
dl 0
loc 16
ccs 0
cts 7
cp 0
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A current() 0 9 1
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