| Conditions | 4 |
| Paths | 8 |
| Total Lines | 17 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 0 |
| CRAP Score | 20 |
| Changes | 0 | ||
| 1 | <?php |
||
| 96 | public function toArray(): array |
||
| 97 | { |
||
| 98 | $options = []; |
||
| 99 | |||
| 100 | if ($this->getTimeout()) { |
||
| 101 | $options['timeout'] = $this->getTimeout(); |
||
| 102 | } |
||
| 103 | |||
| 104 | if ($this->getConnectTimeout()) { |
||
| 105 | $options['connect_timeout'] = $this->getConnectTimeout(); |
||
| 106 | } |
||
| 107 | |||
| 108 | if ($this->getProxy()) { |
||
| 109 | $options['proxy'] = $this->getProxy(); |
||
| 110 | } |
||
| 111 | |||
| 112 | return $options; |
||
| 113 | } |
||
| 115 |