PrefixTrait::getPrefixOption()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 1
nc 1
nop 0
dl 0
loc 3
ccs 2
cts 2
cp 1
crap 1
rs 10
c 1
b 0
f 0
1
<?php
2
/**
3
 * This file is part of the Cache package.
4
 *
5
 * Copyright (c) Daniel González
6
 *
7
 * For the full copyright and license information, please view the LICENSE
8
 * file that was distributed with this source code.
9
 *
10
 * @author Daniel González <[email protected]>
11
 * @author Arnold Daniels <[email protected]>
12
 */
13
14
declare(strict_types=1);
15
16
namespace Desarrolla2\Cache\Option;
17
18
/**
19
 * Prefix option
20
 */
21
trait PrefixTrait
22
{
23
    /**
24
     * @var string
25
     */
26
    protected $prefix = '';
27
28
29
    /**
30
     * Set the key prefix
31
     *
32
     * @param string $prefix
33
     * @return void
34
     */
35 22
    protected function setPrefixOption(string $prefix): void
36
    {
37 22
        $this->prefix = $prefix;
38
    }
39
40
    /**
41
     * Get the key prefix
42
     *
43
     * @return string
44
     */
45 22
    protected function getPrefixOption(): string
46
    {
47 22
        return $this->prefix;
48
    }
49
}
50