IndexOutOfBoundsException   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 27
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 2
c 1
b 0
f 0
lcom 0
cbo 1
dl 0
loc 27
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 5 1
A getIndex() 0 4 1
1
<?php
2
namespace Jmw\Collection\Exception;
3
4
/**
5
 * Thrown when the given index is out of bounds
6
 * @author john
7
 *
8
 */
9
class IndexOutOfBoundsException extends CollectionException
10
{
11
	/**
12
	 * 
13
	 * @var int
14
	 */
15
	protected $index;
16
	
17
	/**
18
	 * 
19
	 * @param int $index
20
	 */
21
	public function __construct($index)
22
	{
23
		$this->index = $index;
24
		parent::__construct("$index was out of bounds");
25
	}
26
	
27
	/**
28
	 * 
29
	 * @return number
30
	 */
31
	public function getIndex()
32
	{
33
		return $this->index;
34
	}
35
}