NotCachedException   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 12
Duplicated Lines 0 %

Test Coverage

Coverage 66.67%

Importance

Changes 0
Metric Value
dl 0
loc 12
ccs 4
cts 6
cp 0.6667
rs 10
c 0
b 0
f 0
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A getLabel() 0 3 1
1
<?php
2
declare(strict_types=1);
3
4
namespace Cacheasy;
5
6
class NotCachedException extends \Exception
7
{
8
    private $label;
9 6
    public function __construct(string $label)
10
    {
11 6
        parent::__construct("The resource `$label` you are trying to hit from cache is not cached yet.");
12 6
        $this->label = $label;
13 6
    }
14
15
    public function getLabel() : string
16
    {
17
        return $this->label;
18
    }
19
}
20