Environment   A
last analyzed

Complexity

Total Complexity 4

Size/Duplication

Total Lines 51
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 1
Metric Value
eloc 10
c 1
b 0
f 1
dl 0
loc 51
rs 10
wmc 4

4 Methods

Rating   Name   Duplication   Size   Complexity  
A tagged() 0 3 1
A app() 0 3 1
A __construct() 0 5 1
A host() 0 3 1
1
<?php
2
/**
3
 * Environment info
4
 * User: moyo
5
 * Date: 27/12/2017
6
 * Time: 4:12 PM
7
 */
8
9
namespace Carno\Log;
10
11
class Environment
12
{
13
    /**
14
     * @var string
15
     */
16
    private $app = null;
17
18
    /**
19
     * @var string
20
     */
21
    private $host = null;
22
23
    /**
24
     * @var string
25
     */
26
    private $tagged = null;
27
28
    /**
29
     * Environment constructor.
30
     * @param string $app
31
     * @param string $tagged
32
     */
33
    public function __construct(string $app = 'app', string $tagged = '')
34
    {
35
        $this->app = $app;
36
        $this->host = gethostname();
37
        $this->tagged = $tagged;
38
    }
39
40
    /**
41
     * @return string
42
     */
43
    public function app() : string
44
    {
45
        return $this->app;
46
    }
47
48
    /**
49
     * @return string
50
     */
51
    public function host() : string
52
    {
53
        return $this->host;
54
    }
55
56
    /**
57
     * @return string
58
     */
59
    public function tagged() : string
60
    {
61
        return $this->tagged;
62
    }
63
}
64