Conditions | 2 |
Paths | 2 |
Total Lines | 13 |
Code Lines | 7 |
Lines | 0 |
Ratio | 0 % |
Tests | 8 |
CRAP Score | 2 |
Changes | 0 |
1 | <?php |
||
12 | 1 | protected function sendRequest(RequestInterface $request) |
|
13 | { |
||
14 | 1 | $request = $this->authenticate($request); |
|
15 | |||
16 | 1 | $response = $this->discoverClient()->sendRequest($request); |
|
17 | |||
18 | 1 | if ($request->getBody()->isSeekable()) { |
|
19 | 1 | $request->getBody()->rewind(); |
|
20 | 1 | } |
|
21 | 1 | $this->rawRequest = $request->getBody()->__toString(); |
|
|
|||
22 | |||
23 | 1 | return $response; |
|
24 | } |
||
25 | |||
34 |
In PHP it is possible to write to properties without declaring them. For example, the following is perfectly valid PHP code:
Generally, it is a good practice to explictly declare properties to avoid accidental typos and provide IDE auto-completion: