Completed
Push — master ( 39b3fc...3ebb26 )
by Sergey
12:04 queued 07:06
created

RpcResultError::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
cc 1
eloc 1
c 0
b 0
f 0
nc 1
nop 0
dl 0
loc 3
ccs 0
cts 2
cp 0
crap 2
rs 10
1
<?php
2
3
/**
4
 * Created by PhpStorm.
5
 * Project: json-rpc-server
6
 * User: sv
7
 * Date: 03.07.2020
8
 * Time: 15:32
9
 */
10
11
declare(strict_types=1);
12
13
namespace Onnov\JsonRpcServer\Result;
14
15
/**
16
 * Class RpcResultError
17
 * @package Onnov\JsonRpcServer\Result
18
 */
19
class RpcResultError extends RpcResultAbstract
20
{
21
    public function __construct()
22
    {
23
        $this->result = 'error';
24
    }
25
26
    /**
27
     * @return string
28
     */
29
    public function getResult(): string
30
    {
31
        return $this->result;
0 ignored issues
show
Bug Best Practice introduced by
The expression return $this->result could return the type null which is incompatible with the type-hinted return string. Consider adding an additional type-check to rule them out.
Loading history...
32
    }
33
}
34