Prefixed::key()   A
last analyzed

Complexity

Conditions 2
Paths 2

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 2
eloc 1
nc 2
nop 1
dl 0
loc 3
rs 10
c 0
b 0
f 0
1
<?php
2
/**
3
 * Prefixed cache-key
4
 * User: moyo
5
 * Date: 26/10/2017
6
 * Time: 10:56 AM
7
 */
8
9
namespace Carno\Cache\Chips;
10
11
trait Prefixed
12
{
13
    /**
14
     * @param string $input
15
     * @return string
16
     */
17
    protected function key(string $input) : string
18
    {
19
        return $this->prefix ? sprintf('%s:%s', $this->prefix, $input) : $input;
20
    }
21
}
22