Padding   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 14
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Test Coverage

Coverage 100%

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A read() 0 5 1
1
<?php
2
3
namespace Zerg\Field;
4
5
use Zerg\Stream\AbstractStream;
6
7
/**
8
 * Padding field helps to skip some data not reading it.
9
 *
10
 * Field not designed to return some value and save it.
11
 * So in parsed DataSet there will not this field.
12
 * But given amount of data will be skipped.
13
 *
14
 * @since 0.1
15
 * @package Zerg\Field
16
 */
17
class Padding extends Scalar
18
{
19
    /**
20
     * Tells current Stream to skip given amount of bits.
21
     *
22
     * @param AbstractStream $stream Stream which which should skip data.
23
     * @return null To detect that no value has been read.
24
     */
25 5
    public function read(AbstractStream $stream)
26
    {
27 5
        $stream->skip($this->getSize());
28 5
        return null;
29
    }
30
}