Directory   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 12
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A decompress() 0 3 1
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