CategoryLoopException::setCategoryPath()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 3
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 3
ccs 3
cts 3
cp 1
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 1
crap 1
1
<?php
2
3
namespace Mediawiki\Api;
4
5
use Mediawiki\DataModel\Pages;
6
7
/**
8
 * Class CategoryLoopException
9
 * @package Mediawiki\Api
10
 */
11
class CategoryLoopException extends \Exception {
12
13
	/** @var Pages */
14
	protected $categoryPath;
15
16
	/**
17
	 * @param Pages $path
18
	 */
19 1
	public function setCategoryPath( Pages $path ) {
20 1
		$this->categoryPath = $path;
21 1
	}
22
23
	/**
24
	 * Get the path of Pages that comprise the category loop. The first item in this list is also a
25
	 * child page of the last item.
26
	 * @return Pages The set of category Pages that comprise the category loop.
27
	 */
28 1
	public function getCategoryPath() {
29 1
		return $this->categoryPath;
30
	}
31
32
}
33