Completed
Push — master ( 8024bc...f8f0d2 )
by Vitor
14s
created

ConfigurationException::__construct()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 4
CRAP Score 2

Importance

Changes 0
Metric Value
eloc 3
c 0
b 0
f 0
dl 0
loc 5
ccs 4
cts 4
cp 1
rs 10
cc 2
nc 2
nop 2
crap 2
1
<?php
2
3
declare(strict_types=1);
4
5
/**
6
 * SPDX-FileCopyrightText: 2024 Christoph Wurst <[email protected]>
7
 * SPDX-License-Identifier: AGPL-3.0-or-later
8
 */
9
10
namespace OCA\TwoFactorGateway\Exception;
11
12
use Exception;
13
use Throwable;
14
15
class ConfigurationException extends Exception {
16 6
	public function __construct(?string $message = null, ?Throwable $previous = null) {
17 6
		if (!$message) {
18 2
			$message = 'Invalid gateway/provider configuration set';
19
		}
20 6
		parent::__construct(message: $message, previous: $previous);
21
	}
22
}
23