InvalidOrderException   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 10
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 8 1
1
<?php
2
3
namespace WebTheory\Collection\Exception;
4
5
use InvalidArgumentException;
6
use WebTheory\Collection\Contracts\InvalidOrderExceptionInterface;
7
use WebTheory\Collection\Enum\Order;
8
9
class InvalidOrderException extends InvalidArgumentException implements InvalidOrderExceptionInterface
10
{
11 4
    public function __construct(string $given)
12
    {
13 4
        parent::__construct(
14 4
            sprintf(
15 4
                'Order must be either "%s" or "%s", "%s" given',
16 4
                Order::Asc,
17 4
                Order::Desc,
18 4
                $given
19 4
            )
20 4
        );
21
    }
22
}
23