TarBSDTarAdapter   A
last analyzed

Complexity

Total Complexity 8

Size/Duplication

Total Lines 62
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 10
dl 0
loc 62
rs 10
c 0
b 0
f 0
wmc 8

8 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A getListMembersOptions() 0 3 1
A getDefaultInflatorBinaryName() 0 3 1
A getExtractMembersOptions() 0 3 1
A getName() 0 3 1
A getLocalOptions() 0 3 1
A getDefaultDeflatorBinaryName() 0 3 1
A getExtractOptions() 0 3 1
1
<?php
2
3
namespace Gocobachi\Compressy\Adapter\BSDTar;
4
5
use Gocobachi\Compressy\Adapter\AbstractTarAdapter;
6
use Gocobachi\Compressy\Adapter\VersionProbe\BSDTarVersionProbe;
7
use Gocobachi\Compressy\Parser\ParserInterface;
8
use Gocobachi\Compressy\Resource\ResourceManager;
9
use Gocobachi\Compressy\ProcessBuilder\ProcessBuilderFactoryInterface;
10
11
/**
12
 * BSDTAR allows you to create and extract files from archives using BSD tar
13
 *
14
 * @see http://people.freebsd.org/~kientzle/libarchive/man/bsdtar.1.txt
15
 */
16
class TarBSDTarAdapter extends AbstractTarAdapter
17
{
18
    public function __construct(ParserInterface $parser, ResourceManager $manager, ProcessBuilderFactoryInterface $inflator, ProcessBuilderFactoryInterface $deflator)
19
    {
20
        parent::__construct($parser, $manager, $inflator, $deflator);
21
        $this->probe = new BSDTarVersionProbe($inflator, $deflator);
22
    }
23
24
    /**
25
     * @inheritdoc
26
     */
27
    protected function getLocalOptions()
28
    {
29
        return array();
30
    }
31
32
    /**
33
     * @inheritdoc
34
     */
35
    public static function getName()
36
    {
37
        return 'bsd-tar';
38
    }
39
40
    /**
41
     * @inheritdoc
42
     */
43
    public static function getDefaultDeflatorBinaryName()
44
    {
45
        return array('bsdtar', 'tar');
46
    }
47
48
    /**
49
     * @inheritdoc
50
     */
51
    public static function getDefaultInflatorBinaryName()
52
    {
53
        return array('bsdtar', 'tar');
54
    }
55
56
    /**
57
     * {@inheritdoc}
58
     */
59
    protected function getListMembersOptions()
60
    {
61
        return array();
62
    }
63
64
    /**
65
     * {@inheritdoc}
66
     */
67
    protected function getExtractOptions()
68
    {
69
        return array();
70
    }
71
72
    /**
73
     * {@inheritdoc}
74
     */
75
    protected function getExtractMembersOptions()
76
    {
77
        return array();
78
    }
79
}
80