Directory::decompress()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 1
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
ccs 1
cts 1
cp 1
crap 1
rs 10
1
<?php
2
3
namespace phpbu\App\Backup\Decompressor;
4
5
use phpbu\App\Backup\Target;
6
7
/**
8
 * Class Directory
9
 *
10
 * @package    phpbu
11
 * @subpackage
12
 * @author     Sebastian Feldmann <[email protected]>
13
 * @copyright  Sebastian Feldmann <[email protected]>
14
 * @license    https://opensource.org/licenses/MIT The MIT License (MIT)
15
 * @link       https://www.phpbu.de/
16
 * @since      Class available since Release 6.0.0
17
 */
18
class Directory implements Decompressable
19
{
20
21
    /**
22
     * Return extraction command for given filename
23
     *
24
     * @param \phpbu\App\Backup\Target $target
25
     * @return string
26
     */
27
    public function decompress(Target $target): string
28
    {
29 1
        return 'tar -xvf ' . $target->getFilename();
30
    }
31
}
32