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

Config   A

Complexity

Total Complexity 5

Size/Duplication

Total Lines 39
Duplicated Lines 0 %

Importance

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

5 Methods

Rating   Name   Duplication   Size   Complexity  
A isFrozen() 0 3 1
A setFrozen() 0 3 1
A __construct() 0 5 1
A isUsingUUID() 0 3 1
A getModelNamespace() 0 3 1
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