Passed
Push — master ( 492d62...97293d )
by Jeroen
58:03
created

EntityNotFoundException::__construct()   A

Complexity

Conditions 3
Paths 4

Size

Total Lines 8
Code Lines 5

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 12

Importance

Changes 0
Metric Value
cc 3
eloc 5
nc 4
nop 3
dl 0
loc 8
ccs 0
cts 8
cp 0
crap 12
rs 9.4285
c 0
b 0
f 0
1
<?php
2
3
namespace Elgg;
4
5
use Throwable;
6
7
/**
8
 * Thrown when entity can not be found
9
 */
10
class EntityNotFoundException extends HttpException {
11
12
	/**
13
	 * {@inheritdoc}
14
	 */
15
	public function __construct(string $message = "", int $code = 0, Throwable $previous = null) {
16
		if (!$message) {
17
			$message = elgg_echo('EntityNotFoundException');
18
		}
19
		if (!$code) {
20
			$code = ELGG_HTTP_NOT_FOUND;
21
		}
22
		parent::__construct($message, $code, $previous);
23
	}
24
}
25