Completed
Push — master ( c5a3b4...fa0d52 )
by Arne
01:49
created

DummyStorageDriver::write()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 2
1
<?php
2
3
namespace Archivr\StorageDriver;
4
5
use Archivr\Exception\Exception;
6
7
class DummyStorageDriver implements StorageDriverInterface
8
{
9
    public function read(string $relativePath): string
10
    {
11
        throw new Exception(sprintf('Trying to call %s() on %s.', __FUNCTION__, __CLASS__));
12
    }
13
14
    public function write(string $relativePath, string $content)
15
    {
16
        throw new Exception(sprintf('Trying to call %s() on %s.', __FUNCTION__, __CLASS__));
17
    }
18
19
    public function writeStream(string $relativePath, $stream)
20
    {
21
        throw new Exception(sprintf('Trying to call %s() on %s.', __FUNCTION__, __CLASS__));
22
    }
23
24
    public function exists(string $relativePath): bool
25
    {
26
        throw new Exception(sprintf('Trying to call %s() on %s.', __FUNCTION__, __CLASS__));
27
    }
28
29
    public function unlink(string $relativePath)
30
    {
31
        throw new Exception(sprintf('Trying to call %s() on %s.', __FUNCTION__, __CLASS__));
32
    }
33
34
    public function getReadStream(string $relativePath)
35
    {
36
        throw new Exception(sprintf('Trying to call %s() on %s.', __FUNCTION__, __CLASS__));
37
    }
38
}
39