Completed
Push — master ( 675097...51fab9 )
by duan
01:47
created

Node::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 3
CRAP Score 1

Importance

Changes 0
Metric Value
cc 1
eloc 2
nc 1
nop 2
dl 0
loc 4
ccs 3
cts 3
cp 1
crap 1
rs 10
c 0
b 0
f 0
1
<?php
2
3
namespace Yiranzai\File;
4
5
/**
6
 * Class Node
7
 * @package Yiranzai\Dht
8
 */
9
class Node
10
{
11
    /**
12
     * @var
13
     */
14
    public $data;
15
    /**
16
     * @var Node|null
17
     */
18
    public $next;
19
    /**
20
     * @var
21
     */
22
    public $key;
23
24
    /**
25
     * Node constructor.
26
     * @param string $key
27
     * @param string $data
28
     */
29 6
    public function __construct(string $key, string $data = null)
30
    {
31 6
        $this->key  = $key;
32 6
        $this->data = $data;
33 6
    }
34
}
35