CleanUpDirectories::getList()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 8
Code Lines 5

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 8
c 0
b 0
f 0
rs 9.4285
cc 1
eloc 5
nc 1
nop 1
1
<?php
2
namespace Genkgo\Srvcleaner\Tasks;
3
4
use CallbackFilterIterator;
5
6
/**
7
 * Class CleanUpDirectoriesTask
8
 * @package Genkgo\Srvcleaner\Tasks
9
 */
10
class CleanUpDirectories extends AbstractFilesystemCleanUp
11
{
12
    /**
13
     * @param $match
14
     * @return CallbackFilterIterator
15
     */
16
    protected function getList ($match) {
17
        $glob = new \GlobIterator($match);
18
        $filter = function (\SplFileInfo $item) {
19
            return $item->isDir();
20
        };
21
22
        return new CallbackFilterIterator($glob, $filter);
23
    }
24
}
25