Passed
Push — main ( b94a81...f6c2a3 )
by Pranjal
02:29
created

Config   A

Complexity

Total Complexity 5

Size/Duplication

Total Lines 38
Duplicated Lines 0 %

Importance

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

5 Methods

Rating   Name   Duplication   Size   Complexity  
A useUUID() 0 3 1
A isFrozen() 0 3 1
A setFrozen() 0 3 1
A __construct() 0 4 1
A isUsingUUID() 0 3 1
1
<?php
2
/*
3
 * This file is part of the Scrawler package.
4
 *
5
 * (c) Pranjal Pandey <[email protected]>
6
 *
7
 * For the full copyright and license information, please view the LICENSE
8
 * file that was distributed with this source code.
9
 */
10
11
namespace Scrawler\Arca;
12
13
/**
14
 * Class to store the configuration.
15
 */
16
class Config
17
{
18
    public function __construct(
19
        private bool $isUUID = false,
20
        private bool $isFrozen = false)
21
    {
22
    }
23
24
    /**
25
     * Set if the connection is using UUID.
26
     */
27
    public function useUUID(bool $isUuid): void
28
    {
29
        $this->isUUID = $isUuid;
30
    }
31
32
    /**
33
     * Get if the connection is using UUID.
34
     */
35
    public function isUsingUUID(): bool
36
    {
37
        return $this->isUUID;
38
    }
39
40
    /**
41
     * Set if the connection is frozen.
42
     */
43
    public function setFrozen(bool $isFrozen): void
44
    {
45
        $this->isFrozen = $isFrozen;
46
    }
47
48
    /**
49
     * Get if the connection is frozen.
50
     */
51
    public function isFrozen(): bool
52
    {
53
        return $this->isFrozen;
54
    }
55
}
56