Config::publicKey()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 1
Metric Value
cc 1
eloc 1
c 1
b 0
f 1
nc 1
nop 0
dl 0
loc 3
rs 10
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