MissingPageException   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 9
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 5
dl 0
loc 9
rs 10
c 0
b 0
f 0
wmc 2

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 5 2
1
<?php declare( strict_types=1 );
2
3
namespace BotRiconferme\Exception;
4
5
/**
6
 * Error thrown when trying to read a non-existent page, or write it when nocreate is specified
7
 */
8
class MissingPageException extends APIRequestException {
9
	/**
10
	 * @param string|null $title If available
11
	 */
12
	public function __construct( string $title = null ) {
13
		if ( $title ) {
14
			parent::__construct( "The specified page doesn't exist: $title" );
15
		} else {
16
			parent::__construct();
17
		}
18
	}
19
}
20