Passed
Push — master ( 1ea99c...4deb53 )
by Petr
02:13
created

TVolumeFile   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 5
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 1
eloc 2
c 1
b 0
f 0
dl 0
loc 5
ccs 2
cts 2
cp 1
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A justFilesCallback() 0 3 1
1
<?php
2
3
namespace kalanis\kw_tree\Traits;
4
5
6
use SplFileInfo;
7
8
9
/**
10
 * Trait TVolumeFile
11
 * @package kalanis\kw_tree\Traits
12
 * Prepared callbacks for usage with volume
13
 * Return only nodes identified as files
14
 */
15
trait TVolumeFile
16
{
17 2
    public function justFilesCallback(SplFileInfo $node): bool
18
    {
19 2
        return $node->isFile();
20
    }
21
}
22