MissingProviderException   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 getLabel() 0 3 1
A __construct() 0 4 1
1
<?php
2
declare(strict_types=1);
3
4
namespace Cacheasy;
5
6
class MissingProviderException extends \Exception
7
{
8
    private $label;
9 1
    public function __construct(string $label)
10
    {
11 1
        parent::__construct("The content of the resource `$label` must be provided by some provider, but no provider is specified for it.");
12 1
        $this->label = $label;
13 1
    }
14
15
    public function getLabel() : string
16
    {
17
        return $this->label;
18
    }
19
}
20