ValueResponse::parse()   A
last analyzed

Complexity

Conditions 2
Paths 2

Size

Total Lines 7
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 2
eloc 3
nc 2
nop 0
dl 0
loc 7
rs 10
c 0
b 0
f 0
1
<?php
2
3
namespace seregazhuk\React\Memcached\Protocol\Response;
4
5
use seregazhuk\React\Memcached\Exception\FailedCommandException;
6
use seregazhuk\React\Memcached\Protocol\Parser;
7
8
class ValueResponse extends Response
9
{
10
    /**
11
     * {@inheritdoc}
12
     */
13
    public function parse()
14
    {
15
        if ($this->data === Parser::RESPONSE_NOT_FOUND) {
16
            $this->fail();
17
        }
18
19
        return trim($this->data);
20
    }
21
}
22