CleanUpDirectories   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 15
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 0
Metric Value
wmc 1
lcom 0
cbo 1
dl 0
loc 15
c 0
b 0
f 0
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A getList() 0 8 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