CacheException::getKey()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 1
CRAP Score 1

Importance

Changes 0
Metric Value
eloc 1
c 0
b 0
f 0
dl 0
loc 3
ccs 1
cts 1
cp 1
rs 10
cc 1
nc 1
nop 0
crap 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Yiisoft\Cache\Exception;
6
7
use RuntimeException;
8
use Throwable;
9
10
abstract class CacheException extends RuntimeException implements \Psr\SimpleCache\CacheException
11
{
12
    public function __construct(
13
        private string $key,
14 4
        string $message = '',
15
        int $code = 0,
16 4
        Throwable $previous = null
17 4
    ) {
18
        parent::__construct($message, $code, $previous);
19
    }
20 2
21
    public function getKey(): string
22 2
    {
23
        return $this->key;
24
    }
25
}
26