Site   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 20
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Importance

Changes 0
Metric Value
wmc 3
lcom 1
cbo 1
dl 0
loc 20
rs 10
c 0
b 0
f 0

3 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A url() 0 4 1
A shouldBeMonitoredByOhDear() 0 4 1
1
<?php
2
3
namespace OhDear\ForgeSync;
4
5
class Site
6
{
7
    /** @var \OhDear\ForgeSync\NginxConfigFile */
8
    protected $nginxConfigFile;
9
10
    public function __construct(string $nginxConfileFileContent)
11
    {
12
        $this->nginxConfigFile = new NginxConfigFile($nginxConfileFileContent);
13
    }
14
15
    public function url(): string
16
    {
17
        return "{$this->nginxConfigFile->protocol()}://{$this->nginxConfigFile->siteName()}";
18
    }
19
20
    public function shouldBeMonitoredByOhDear(): bool
21
    {
22
        return $this->nginxConfigFile->shouldBeMonitoredByOhDear();
23
    }
24
}
25