TarBz2BSDTarAdapter   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 16
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 3
dl 0
loc 16
rs 10
c 0
b 0
f 0
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A getLocalOptions() 0 3 1
A doAdd() 0 3 1
1
<?php
2
3
namespace Gocobachi\Compressy\Adapter\BSDTar;
4
5
use Gocobachi\Compressy\Adapter\Resource\ResourceInterface;
6
use Gocobachi\Compressy\Exception\NotSupportedException;
7
8
class TarBz2BSDTarAdapter extends TarBSDTarAdapter
9
{
10
    /**
11
     * @inheritdoc
12
     */
13
    protected function doAdd(ResourceInterface $resource, $files, $recursive)
14
    {
15
        throw new NotSupportedException('Updating a compressed tar archive is not supported.');
16
    }
17
18
    /**
19
     * @inheritdoc
20
     */
21
    protected function getLocalOptions()
22
    {
23
        return array('--bzip2');
24
    }
25
}
26