Completed
Pull Request — master (#81)
by
unknown
01:48
created

Bzip2Compressor::getCompressorCommand()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 6

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 6
rs 10
c 0
b 0
f 0
cc 2
nc 2
nop 0
1
<?php
2
3
namespace Spatie\DbDumper\Compressors;
4
5
class Bzip2Compressor implements Compressor
6
{
7
    protected $level = null;
8
9
    protected $extension = '.bz2';
10
11
    public function getCompressorCommand()
12
    {
13
        $level = $this->level ? " -f{$this->level}" : '';
14
15
        return 'bzip2' . $level;
16
    }
17
18
    public function getExtension()
19
    {
20
        return $this->extension;
21
    }
22
23
    public function setLevel(string $level)
24
    {
25
        $this->level = $level;
26
    }
27
}
28