Completed
Push — master ( d44724...37cbf9 )
by no
05:17
created

getRepositoryName()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 3
rs 10
cc 1
eloc 2
nc 1
nop 0
1
<?php
2
3
namespace Wikibase\DataModel\Services\Lookup;
4
5
use Exception;
6
use InvalidArgumentException;
7
8
/**
9
 * @since 3.7
10
 *
11
 * @license GPL-2.0+
12
 */
13
class UnknownForeignRepositoryException extends InvalidArgumentException {
14
15
	/**
16
	 * @var string
17
	 */
18
	private $repositoryName;
19
20
	/**
21
	 * @param string $repositoryName
22
	 * @param string|null $message
23
	 * @param Exception|null $previous
24
	 */
25
	public function __construct( $repositoryName, $message = null, Exception $previous = null ) {
26
		$this->repositoryName = $repositoryName;
27
28
		parent::__construct(
29
			$message ?: 'Unknown repository name: ' . $repositoryName,
30
			0,
31
			$previous
32
		);
33
	}
34
35
	/**
36
	 * @return string
37
	 */
38
	public function getRepositoryName() {
39
		return $this->repositoryName;
40
	}
41
42
}
43