Passed
Push — main ( acd765...cb159e )
by Pranjal
02:24
created

Config::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 0

Duplication

Lines 0
Ratio 0 %

Importance

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