| Conditions | 2 |
| Paths | 2 |
| Total Lines | 13 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 8 |
| CRAP Score | 2 |
| Changes | 0 | ||
| 1 | <?php |
||
| 9 | 8 | public function connect(string $address, array $options = []): static |
|
|
|
|||
| 10 | { |
||
| 11 | 8 | $mode = $options['mode'] ?? 'a'; |
|
| 12 | 8 | $include_path = $options['use_include_path'] ?? false; |
|
| 13 | 8 | $context = $options['context'] ?? null; |
|
| 14 | |||
| 15 | 8 | $params = [$address, $mode, $include_path]; |
|
| 16 | 8 | $context && array_push($params, $context); |
|
| 17 | |||
| 18 | 8 | $this->target = fopen(...$params); |
|
| 19 | |||
| 20 | 8 | return $this; |
|
| 21 | } |
||
| 22 | } |
||
| 23 |