Test Failed
Push — master ( 29d761...e93c95 )
by Alexpts
01:54
created

File::connect()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 10

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
dl 0
loc 10
ccs 0
cts 6
cp 0
rs 9.9332
c 0
b 0
f 0
cc 1
nc 1
nop 3
crap 2
1
<?php
2
declare(strict_types=1);
3
4
namespace PTS\Transport;
5
6
class File extends Socket
7
{
8
9
    public function connect(string $address, int $port = 0, array $options = []): TransportInterface
10
    {
11
        $mode = $options['mode'] ?? 'a';
12
        $include_path = $options['use_include_path'] ?? false;
13
        $context = $options['context'] ?? null;
14
15
        $this->socket = fopen($address, $mode, $include_path, $context);
16
17
        return $this;
18
    }
19
}
20