Config   A
last analyzed

Complexity

Total Complexity 4

Size/Duplication

Total Lines 39
Duplicated Lines 0 %

Importance

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

4 Methods

Rating   Name   Duplication   Size   Complexity  
A domain() 0 3 1
A publicKey() 0 3 1
A __construct() 0 4 1
A createCalltools() 0 3 1
1
<?php
2
3
namespace Phrlog\Zvonok;
4
5
class Config
6
{
7
    private $publicKey;
8
    private $domain;
9
10
    /**
11
     * Config constructor.
12
     * @param string $publicKey
13
     * @param string $domain
14
     */
15
    public function __construct(string $publicKey, string $domain)
16
    {
17
        $this->publicKey = $publicKey;
18
        $this->domain = $domain;
19
    }
20
21
    /**
22
     * @return string
23
     */
24
    public function publicKey(): string
25
    {
26
        return $this->publicKey;
27
    }
28
29
    /**
30
     * @return string
31
     */
32
    public function domain(): string
33
    {
34
        return $this->domain;
35
    }
36
37
    /**
38
     * @param string $publicKey
39
     * @return Config
40
     */
41
    public static function createCalltools(string $publicKey): Config
42
    {
43
        return new self($publicKey, 'https://calltools.ru');
44
    }
45
}
46