Completed
Pull Request — master (#602)
by Tom
09:02
created

DBALConfiguration   A

Complexity

Total Complexity 6

Size/Duplication

Total Lines 74
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Test Coverage

Coverage 26.67%

Importance

Changes 0
Metric Value
wmc 6
lcom 1
cbo 1
dl 0
loc 74
ccs 4
cts 15
cp 0.2667
rs 10
c 0
b 0
f 0
1
<?php
2
3
declare(strict_types=1);
4
5
namespace DoctrineORMModule\Options;
6
7
use Laminas\Stdlib\AbstractOptions;
8
9
/**
10
 * Configuration options for a DBAL Connection
11
 *
12
 * @link    http://www.doctrine-project.org/
13
 */
14
class DBALConfiguration extends AbstractOptions
15
{
16
    /**
17
     * Set the cache key for the result cache. Cache key
18
     * is assembled as "doctrine.cache.{key}" and pulled from
19
     * service locator.
20
     */
21
    protected string $resultCache = 'array';
0 ignored issues
show
Bug introduced by
This code did not parse for me. Apparently, there is an error somewhere around this line:

Syntax error, unexpected T_STRING, expecting T_FUNCTION or T_CONST
Loading history...
22
23
    /**
24
     * Set the class name of the SQL Logger, or null, to disable.
25
     */
26
    protected string $sqlLogger = null;
27
28
    /**
29
     * Keys must be the name of the type identifier and value is
30
     * the class name of the Type
31
     *
32
     * @var array
33
     */
34
    protected array $types = [];
35
36
    public function setResultCache(string $resultCache) : void
37
    {
38
        $this->resultCache = $resultCache;
39
    }
40
41
    public function getResultCache() : string
42
    {
43
        return 'doctrine.cache.' . $this->resultCache;
44
    }
45
46
    public function setSqlLogger(string $sqlLogger) : void
47
    {
48
        $this->sqlLogger = $sqlLogger;
49
    }
50
51
    public function getSqlLogger() : string
52
    {
53
        return $this->sqlLogger;
54
    }
55
56
    /**
57
     * @param array $types
58
     */
59
    public function setTypes(array $types) : void
60
    {
61
        $this->types = $types;
62
    }
63
64
    public function getTypes() : string
65
    {
66
        return $this->types;
67 86
    }
68
}
69