Endpoint::address()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 1
Metric Value
eloc 1
c 1
b 0
f 1
dl 0
loc 3
rs 10
cc 1
nc 1
nop 0
1
<?php
2
/**
3
 * Network endpoint (advanced features)
4
 * User: moyo
5
 * Date: 22/09/2017
6
 * Time: 6:19 PM
7
 */
8
9
namespace Carno\Net;
10
11
use Carno\Net\Chips\Endpoint\Identify;
12
use Carno\Net\Chips\Endpoint\Naming;
13
use Carno\Net\Chips\Endpoint\Options;
14
use Carno\Net\Chips\Endpoint\Printable;
15
use Carno\Net\Chips\Endpoint\Tagging;
16
17
class Endpoint
18
{
19
    use Identify, Naming, Tagging, Options, Printable;
20
21
    /**
22
     * @var Address
23
     */
24
    private $address = null;
25
26
    /**
27
     * Endpoint constructor.
28
     * @param Address $address
29
     */
30
    public function __construct(Address $address)
31
    {
32
        $this->address = $address;
33
    }
34
35
    /**
36
     * @return Address
37
     */
38
    public function address() : Address
39
    {
40
        return $this->address;
41
    }
42
}
43