Completed
Pull Request — master (#4)
by Randy
02:01
created

DummyStream   A

Complexity

Total Complexity 16

Size/Duplication

Total Lines 84
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 0
Metric Value
wmc 16
lcom 0
cbo 0
dl 0
loc 84
rs 10
c 0
b 0
f 0

16 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A __toString() 0 4 1
A close() 0 4 1
A detach() 0 4 1
A getSize() 0 4 1
A tell() 0 4 1
A eof() 0 4 1
A isSeekable() 0 4 1
A seek() 0 4 1
A rewind() 0 4 1
A isWritable() 0 4 1
A write() 0 4 1
A isReadable() 0 4 1
A read() 0 4 1
A getContents() 0 4 1
A getMetadata() 0 4 1
1
<?php
2
3
namespace Demv\JSend\Test;
4
5
use Psr\Http\Message\StreamInterface;
6
7
/**
8
 * Class DummyStream
9
 * @package Demv\JSend\Test
10
 */
11
final class DummyStream implements StreamInterface
12
{
13
    private $content;
14
15
    public function __construct(string $content)
16
    {
17
        $this->content = $content;
18
    }
19
20
    public function __toString()
21
    {
22
        return $this->getContents();
23
    }
24
25
    public function close(): void
26
    {
27
        // TODO: Implement close() method.
28
    }
29
30
    public function detach(): void
31
    {
32
        // TODO: Implement detach() method.
33
    }
34
35
    public function getSize(): void
36
    {
37
        // TODO: Implement getSize() method.
38
    }
39
40
    public function tell(): void
41
    {
42
        // TODO: Implement tell() method.
43
    }
44
45
    public function eof(): void
46
    {
47
        // TODO: Implement eof() method.
48
    }
49
50
    public function isSeekable(): void
51
    {
52
        // TODO: Implement isSeekable() method.
53
    }
54
55
    public function seek($offset, $whence = SEEK_SET): void
56
    {
57
        // TODO: Implement seek() method.
58
    }
59
60
    public function rewind(): void
61
    {
62
        // TODO: Implement rewind() method.
63
    }
64
65
    public function isWritable(): void
66
    {
67
        // TODO: Implement isWritable() method.
68
    }
69
70
    public function write($string): void
71
    {
72
        // TODO: Implement write() method.
73
    }
74
75
    public function isReadable(): void
76
    {
77
        // TODO: Implement isReadable() method.
78
    }
79
80
    public function read($length): void
81
    {
82
        // TODO: Implement read() method.
83
    }
84
85
    public function getContents()
86
    {
87
        return $this->content;
88
    }
89
90
    public function getMetadata($key = null): void
91
    {
92
        // TODO: Implement getMetadata() method.
93
    }
94
}