Naming::relatedService()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 1
Metric Value
eloc 2
c 1
b 0
f 1
dl 0
loc 4
rs 10
cc 1
nc 1
nop 1
1
<?php
2
/**
3
 * Naming (currently for service)
4
 * User: moyo
5
 * Date: 21/11/2017
6
 * Time: 3:37 PM
7
 */
8
9
namespace Carno\Net\Chips\Endpoint;
10
11
trait Naming
12
{
13
    /**
14
     * @var string
15
     */
16
    private $service = 'unspecified';
17
18
    /**
19
     * @return string
20
     */
21
    public function service() : string
22
    {
23
        return $this->service;
24
    }
25
26
    /**
27
     * @param string $service
28
     * @return self
29
     */
30
    public function relatedService(string $service) : self
31
    {
32
        $this->service = $service;
33
        return $this;
34
    }
35
}
36