Conditions | 2 |
Paths | 2 |
Total Lines | 12 |
Code Lines | 8 |
Lines | 0 |
Ratio | 0 % |
Tests | 6 |
CRAP Score | 2.0625 |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
23 | 3 | protected function openConnection() |
|
24 | { |
||
25 | try { |
||
26 | 3 | $this->client->open( |
|
|
|||
27 | 3 | $this->credentials->environment(), |
|
28 | 3 | $this->credentials->certificate(), |
|
29 | 3 | $this->credentials->passPhrase() |
|
30 | ); |
||
31 | } catch (Exception $exception) { |
||
32 | throw ConnectionFailed::create($exception); |
||
33 | } |
||
34 | 3 | } |
|
35 | |||
46 |
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: