InvalidRequestException   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 12
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 100%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 2
c 1
b 0
f 0
lcom 0
cbo 0
dl 0
loc 12
ccs 4
cts 4
cp 1
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A invalidApiKey() 0 4 1
A rateLimitReached() 0 4 1
1
<?php
2
3
namespace PtrTn\Battlerite\Exception;
4
5
use Exception;
6
7
class InvalidRequestException extends Exception
8
{
9 1
    public static function invalidApiKey(string $apiKey): self
10
    {
11 1
        return new self(sprintf('Invalid Api key "%s"', $apiKey));
12
    }
13
14 1
    public static function rateLimitReached(): self
15
    {
16 1
        return new self('Rate limit reached');
17
    }
18
}
19