Unknown   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 22
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

Changes 2
Bugs 0 Features 0
Metric Value
eloc 8
c 2
b 0
f 0
dl 0
loc 22
ccs 0
cts 10
cp 0
rs 10
wmc 3

2 Methods

Rating   Name   Duplication   Size   Complexity  
A write() 0 8 2
A read() 0 4 1
1
<?php
2
3
namespace SPSS\Sav\Record\Info;
4
5
use SPSS\Buffer;
6
use SPSS\Sav\Record\Info;
7
8
class Unknown extends Info
9
{
10
    /**
11
     * @param Buffer $buffer
12
     */
13
    public function read(Buffer $buffer)
14
    {
15
        parent::read($buffer);
16
        $this->data['raw'] = $buffer->readString($this->dataSize * $this->dataCount);
17
    }
18
19
    /**
20
     * @param Buffer $buffer
21
     */
22
    public function write(Buffer $buffer)
23
    {
24
        if (! isset($this->data['raw'])) {
25
            $this->data['raw'] = '';
26
        }
27
        $this->dataCount = strlen($this->data['raw']);
28
        parent::write($buffer);
29
        $buffer->writeString($this->data['raw']);
30
    }
31
}
32