MissingSectionException   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 7
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 2
dl 0
loc 7
rs 10
c 0
b 0
f 0
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 2 1
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