Named::named()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 3
nc 1
nop 2
dl 0
loc 5
rs 10
c 0
b 0
f 0
1
<?php
2
/**
3
 * Metrics named
4
 * User: moyo
5
 * Date: 2018/5/18
6
 * Time: 10:29 AM
7
 */
8
9
namespace Carno\Monitor\Chips\Metrical;
10
11
trait Named
12
{
13
    /**
14
     * @var string
15
     */
16
    private $name = '';
17
18
    /**
19
     * @var string
20
     */
21
    private $description = '';
22
23
    /**
24
     * @param string $name
25
     * @param string $description
26
     * @return static
27
     */
28
    public function named(string $name, string $description = '') : self
29
    {
30
        $this->name = $name;
31
        $this->description = $description;
32
        return $this;
33
    }
34
}
35