Named   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 22
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 6
dl 0
loc 22
rs 10
c 0
b 0
f 0
wmc 1

1 Method

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