MissingSectionException::__construct()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 2
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 1
nc 1
nop 2
dl 0
loc 2
rs 10
c 0
b 0
f 0
1
<?php declare( strict_types=1 );
2
3
namespace BotRiconferme\Exception;
4
5
/**
6
 * Error thrown when trying to read a non-existent section
7
 */
8
class MissingSectionException extends APIRequestException {
9
	/**
10
	 * @param string $title
11
	 * @param int|string $section Number or title
12
	 */
13
	public function __construct( string $title = '[unavailable]', $section = '[unavailable]' ) {
14
		parent::__construct( "The section $section in the page $title doesn't exist." );
15
	}
16
}
17