Completed
Push — master ( 68f30c...a95a96 )
by Christian
02:25
created

FullChangeSet::get()   B

Complexity

Conditions 1
Paths 1

Size

Total Lines 24
Code Lines 14

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 24
rs 8.9713
c 0
b 0
f 0
nc 1
cc 1
eloc 14
nop 0
1
<?php
2
3
namespace uuf6429\ElderBrother\Change;
4
5
class FullChangeSet
6
{
7
    /**
8
     * @return FileList
9
     */
10
    public static function get()
11
    {
12
        return new FileList(
13
            __METHOD__ . '()',
14
            function () {
15
                $files = iterator_to_array(
16
                    new \RecursiveIteratorIterator(
17
                        new \RecursiveDirectoryIterator(
18
                            getcwd(),
19
                            \RecursiveDirectoryIterator::SKIP_DOTS
20
                        ),
21
                        \RecursiveIteratorIterator::CHILD_FIRST
22
                    )
23
                );
24
25
                return array_map(
26
                    function (\SplFileInfo $file) {
27
                        return $file->getRealPath();
28
                    },
29
                    $files
30
                );
31
            }
32
        );
33
    }
34
}
35