Passed
Push — master ( 864d7f...a4d677 )
by Sebastian
02:02
created

Directory::isSubDirectoryOf()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 1
c 1
b 0
f 0
nc 1
nop 1
dl 0
loc 3
rs 10
ccs 2
cts 2
cp 1
crap 1
1
<?php
2
/**
3
 * This file is part of Camino.
4
 *
5
 * (c) Sebastian Feldmann <[email protected]>
6
 *
7
 * For the full copyright and license information, please view the LICENSE
8
 * file that was distributed with this source code.
9
 */
10
namespace SebastianFeldmann\Camino\Path;
11
12
/**
13
 * Class Directory
14
 *
15
 * @package SebastianFeldmann\Camino
16
 */
17
final class Directory extends Base
18
{
19
    /**
20
     * Checks if the directory is a sub directory of a given directory
21
     *
22
     * @param  \SebastianFeldmann\Camino\Path\Directory $parent
23
     * @return bool
24
     */
25 2
    public function isSubDirectoryOf(Directory $parent): bool
26
    {
27 2
        return $this->isChildOf($parent);
28
    }
29
}
30