ImmutableListTrait::removeAt()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
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 4
rs 10
cc 1
eloc 2
nc 1
nop 1
1
<?php 
2
namespace Jmw\Collection\Lists;
3
4
use Jmw\Collection\ImmutableCollectionTrait;
5
use Jmw\Collection\Exception\UnsupportedOperationException;
6
/**
7
 * This trait is ensures immutability by throwing an exception
8
 * on all mutable ListInterface methods
9
 * @author john
10
 *
11
 */
12
trait ImmutableListTrait
13
{
14
	use ImmutableCollectionTrait;
15
	
16
	/**
17
	 * @throws UnsupportedOperationException
18
	 */
19
	public function addAt($index, $element)
0 ignored issues
show
Unused Code introduced by
The parameter $index is not used and could be removed.

This check looks from parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
Unused Code introduced by
The parameter $element is not used and could be removed.

This check looks from parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
20
	{
21
		throw new UnsupportedOperationException('addAt');
22
	}
23
	
24
	/**
25
	 * @throws UnsupportedOperationException
26
	 */
27
	public function removeAt($index)
0 ignored issues
show
Unused Code introduced by
The parameter $index is not used and could be removed.

This check looks from parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
28
	{
29
		throw new UnsupportedOperationException('removeAt');
30
	}
31
	
32
	/**
33
	 * @throws UnsupportedOperationException
34
	 */
35
	public function set($index, $element)
0 ignored issues
show
Unused Code introduced by
The parameter $index is not used and could be removed.

This check looks from parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
Unused Code introduced by
The parameter $element is not used and could be removed.

This check looks from parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
36
	{
37
		throw new UnsupportedOperationException('set');
38
	}
39
	
40
	/*********************************************
41
	 ** Array Access Methods
42
	 *********************************************/
43
		
44
	/**
45
	 *
46
	 * {@inheritDoc}
47
	 * @see ArrayAccess::offsetSet()
48
	 */
49
	public function offsetSet($offset, $value)
0 ignored issues
show
Unused Code introduced by
The parameter $offset is not used and could be removed.

This check looks from parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
Unused Code introduced by
The parameter $value is not used and could be removed.

This check looks from parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
50
	{
51
		throw new UnsupportedOperationException('offsetSet');
52
	}
53
	
54
	/**
55
	 *
56
	 * {@inheritDoc}
57
	 * @see ArrayAccess::offsetUnset()
58
	 */
59
	public function offsetUnset($offset)
0 ignored issues
show
Unused Code introduced by
The parameter $offset is not used and could be removed.

This check looks from parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
60
	{
61
		throw new UnsupportedOperationException('offsetUnset');
62
	}
63
}