Blackhole   A
last analyzed

Complexity

Total Complexity 4

Size/Duplication

Total Lines 31
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 1
Metric Value
eloc 2
c 1
b 0
f 1
dl 0
loc 31
rs 10
wmc 4

4 Methods

Rating   Name   Duplication   Size   Complexity  
A flushing() 0 2 1
A connect() 0 2 1
A disconnect() 0 3 1
A loading() 0 2 1
1
<?php
2
/**
3
 * Eat anything
4
 * User: moyo
5
 * Date: 2018/6/11
6
 * Time: 2:08 PM
7
 */
8
9
namespace Carno\Traced\Transport;
10
11
use Carno\Net\Address;
12
use Carno\Promise\Promise;
13
use Carno\Promise\Promised;
14
use Carno\Tracing\Contracts\Transport;
15
16
class Blackhole implements Transport
17
{
18
    /**
19
     * @param Address $endpoint
20
     * @param string $identify
21
     */
22
    public function connect(Address $endpoint, string $identify = null) : void
23
    {
24
        // do nothing
25
    }
26
27
    /**
28
     * @return Promised
29
     */
30
    public function disconnect() : Promised
31
    {
32
        return Promise::resolved();
33
    }
34
35
    /**
36
     * @param string $data
37
     */
38
    public function loading(string $data) : void
39
    {
40
        // do nothing
41
    }
42
43
    /**
44
     */
45
    public function flushing() : void
46
    {
47
        // do nothing
48
    }
49
}
50