Passed
Push — master ( 3894cc...b6588e )
by Vladislav
06:30 queued 04:28
created

WebSocketArgument::getReqId()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 1
c 1
b 0
f 0
dl 0
loc 3
rs 10
cc 1
nc 1
nop 0
1
<?php
2
3
namespace Carpenstar\ByBitAPI\Core\Objects\WebSockets;
4
5
use Carpenstar\ByBitAPI\Core\Interfaces\IWebSocketArgumentInterface;
6
7
abstract class WebSocketArgument implements IWebSocketArgumentInterface
8
{
9
    protected ?string $reqId;
10
11
    protected string $symbols;
12
13
    public function __construct(string $symbol, ?string $reqId = null)
14
    {
15
        $this->symbols = $symbol;
16
        $this->reqId = $reqId;
17
    }
18
19
    /**
20
     * @return string
21
     */
22
    public function getReqId(): string
23
    {
24
        return $this->reqId;
0 ignored issues
show
Bug Best Practice introduced by
The expression return $this->reqId 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...
25
    }
26
27
    /**
28
     * @return string
29
     */
30
    public function getSymbols(): string
31
    {
32
        return $this->symbols;
33
    }
34
}
35