StringStream   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 13
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Test Coverage

Coverage 100%

Importance

Changes 5
Bugs 0 Features 0
Metric Value
wmc 1
c 5
b 0
f 0
lcom 0
cbo 2
dl 0
loc 13
ccs 3
cts 3
cp 1
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
1
<?php
2
3
namespace Zerg\Stream;
4
5
use PhpBio\BitBuffer;
6
7
/**
8
 * FileStream wraps string and allow fields to read data from it.
9
 *
10
 * @since 0.1
11
 * @package Zerg\Stream
12
 */
13
class StringStream extends AbstractStream
14
{
15
    /**
16
     * Return new string stream that will read data form given string.
17
     *
18
     * @param string $string
19
     */
20 27
    public function __construct($string)
21
    {
22 27
        $this->buffer = new BitBuffer($string);
23 27
    }
24
25
}