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