Passed
Branch master (e44da5)
by Eric
02:16
created

ThresholdOutOfBoundsException   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 5
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 1
eloc 2
c 1
b 0
f 0
dl 0
loc 5
ccs 2
cts 2
cp 1
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A create() 0 3 1
1
<?php
2
3
declare(strict_types=1);
4
5
/**
6
 * This file is part of PHPUnit Coverage Check.
7
 *
8
 * (c) Eric Sizemore <[email protected]>
9
 * (c) Richard Regeer <[email protected]>
10
 *
11
 * This source file is subject to the MIT license. For the full copyright,
12
 * license information, and credits/acknowledgements, please view the LICENSE
13
 * and README files that were distributed with this source code.
14
 */
15
16
namespace Esi\CoverageCheck\Exceptions;
17
18
use InvalidArgumentException;
19
20
final class ThresholdOutOfBoundsException extends InvalidArgumentException
21
{
22 1
    public static function create(int $threshold): self
23
    {
24 1
        return new self(\sprintf('The threshold must be a minimum of 1 and a maximum of 100, %d given', $threshold));
25
    }
26
}
27