Completed
Push — master ( d6b600...7a8fea )
by Benjamin
10:41
created

InvalidConfiguration   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 17
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 0

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 3
lcom 1
cbo 0
dl 0
loc 17
ccs 4
cts 4
cp 1
rs 10
c 0
b 0
f 0

3 Methods

Rating   Name   Duplication   Size   Complexity  
A noExperiment() 0 4 1
A experiment() 0 4 1
A goal() 0 4 1
1
<?php
2
3
namespace Ben182\AbTesting\Exceptions;
4
5
use Exception;
6
7
class InvalidConfiguration extends Exception
8
{
9 3
    public static function noExperiment(): self
10
    {
11 3
        return new static('There are no experiments set.');
12
    }
13
14 3
    public static function experiment(): self
15
    {
16 3
        return new static('The experiment names should be unique.');
17
    }
18
19
    public static function goal(): self
20
    {
21
        return new static('The goal names should be unique.');
22
    }
23
}
24