TransactionException   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 10
Duplicated Lines 0 %

Test Coverage

Coverage 50%

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A alreadyCommited() 0 3 1
A unableToCommit() 0 3 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Larium\Pay;
6
7
use LogicException;
8
9
class TransactionException extends LogicException
10
{
11
    public static function unableToCommit()
12
    {
13
        return new self("Transaction cannot be commited.");
14
    }
15
16 1
    public static function alreadyCommited()
17
    {
18 1
        return new self('Transaction already commited. No changes allowed.');
19
    }
20
}
21