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

File   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 14
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
wmc 1
lcom 1
cbo 1
dl 0
loc 14
ccs 0
cts 6
cp 0
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A connect() 0 10 1
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