Directory::delete()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
c 0
b 0
f 0
dl 0
loc 4
ccs 2
cts 2
cp 1
rs 10
cc 1
eloc 2
nc 1
nop 0
crap 1
1
<?php
2
3
namespace League\Flysystem;
4
5
class Directory extends Handler
6
{
7
    /**
8
     * Delete the directory.
9
     *
10
     * @return bool
11
     */
12 3
    public function delete()
13
    {
14 3
        return $this->filesystem->deleteDir($this->path);
15
    }
16
17
    /**
18
     * List the directory contents.
19
     *
20
     * @param bool $recursive
21
     *
22
     * @return array|bool directory contents or false
23
     */
24 3
    public function getContents($recursive = false)
25
    {
26 3
        return $this->filesystem->listContents($this->path, $recursive);
27
    }
28
}
29