Completed
Pull Request — master (#77)
by Thomas
06:31
created

DefaultsConfiguration   A

Complexity

Total Complexity 6

Size/Duplication

Total Lines 47
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 1
Bugs 0 Features 1
Metric Value
eloc 8
c 1
b 0
f 1
dl 0
loc 47
ccs 13
cts 13
cp 1
rs 10
wmc 6

6 Methods

Rating   Name   Duplication   Size   Complexity  
A serialize() 0 4 1
A getLogger() 0 3 1
A getFileLinkFormat() 0 3 1
A unserialize() 0 3 1
A getCharset() 0 3 1
A getCacheDirectoryPath() 0 3 1
1
<?php
2
3
declare(strict_types=1);
4
5
/*
6
 * This file is part of the ekino Drupal Debug project.
7
 *
8
 * (c) ekino
9
 *
10
 * For the full copyright and license information, please view the LICENSE
11
 * file that was distributed with this source code.
12
 */
13
14
namespace Ekino\Drupal\Debug\Configuration\Model;
15
16
class DefaultsConfiguration extends AbstractConfiguration
17
{
18
    /**
19
     * @return string
20
     */
21 20
    public function getCacheDirectoryPath(): string
22
    {
23 20
        return $this->processedConfiguration['cache_directory_path'];
24
    }
25
26 20
    public function getLogger(): array
27
    {
28 20
        return $this->processedConfiguration['logger'];
29
    }
30
31
    /**
32
     * @return string|null
33
     */
34 21
    public function getCharset(): ?string
35
    {
36 21
        return $this->processedConfiguration['charset'];
37
    }
38
39
    /**
40
     * @return string|null
41
     */
42 21
    public function getFileLinkFormat(): ?string
43
    {
44 21
        return $this->processedConfiguration['file_link_format'];
45
    }
46
47
    /**
48
     * {@inheritdoc}
49
     */
50 20
    public function serialize(): ?string
51
    {
52 20
        return \serialize(array(
53 20
            $this->processedConfiguration,
54
        ));
55
    }
56
57
    /**
58
     * {@inheritdoc}
59
     */
60 17
    public function unserialize($serialized): void
61
    {
62 17
        list($this->processedConfiguration) = \unserialize($serialized);
63 17
    }
64
}
65