mageekguy\atoum\php\tokenizer\iterators\phpClass: lines coverage

46% of 136

OPs

56% of 16

Lines

27% of 22

Branches

46% of 13

Paths
Method OPs OPs % Lines Line % Branches Branches % Paths Path %
mageekguy\atoum\php\tokenizer\iterators\phpClass::reset() 22 0% 4 0% 1 0% 1 0%
mageekguy\atoum\php\tokenizer\iterators\phpClass::getConstant() 17 0% 1 0% 5 0% 2 0%
mageekguy\atoum\php\tokenizer\iterators\phpClass::getConstants() 6 100% 1 100% 1 100% 1 100%
mageekguy\atoum\php\tokenizer\iterators\phpClass::appendConstant() 15 100% 2 100% 1 100% 1 100%
mageekguy\atoum\php\tokenizer\iterators\phpClass::getMethods() 6 100% 1 100% 1 100% 1 100%
mageekguy\atoum\php\tokenizer\iterators\phpClass::getMethod() 17 0% 1 0% 5 0% 2 0%
mageekguy\atoum\php\tokenizer\iterators\phpClass::appendMethod() 15 100% 2 100% 1 100% 1 100%
mageekguy\atoum\php\tokenizer\iterators\phpClass::getProperties() 6 100% 1 100% 1 100% 1 100%
mageekguy\atoum\php\tokenizer\iterators\phpClass::getProperty() 17 0% 1 0% 5 0% 2 0%
mageekguy\atoum\php\tokenizer\iterators\phpClass::appendProperty() 15 100% 2 100% 1 100% 1 100%
#
1
<?php
2

                    
3
namespace mageekguy\atoum\php\tokenizer\iterators;
4

                    
5
use
6
	mageekguy\atoum\exceptions,
7
	mageekguy\atoum\php\tokenizer,
8
	mageekguy\atoum\php\tokenizer\iterators
9
;
10

                    
11
class phpClass extends tokenizer\iterator
12
{
13
	protected $methods = array();
14
	protected $constants = array();
15
	protected $properties = array();
16

                    
17
	public function reset()0%
18
	{
19
		$this->methods = array();
20
		$this->constants = array();
21
		$this->properties = array();
22

                    
23
		return parent::reset();
24
	}
25

                    
26
	public function getConstant($index)0%
27
	{
28
		return (isset($this->constants[$index]) === false ? null : $this->constants[$index]);
29
	}
30

                    
31
	public function getConstants()100%
32
	{
33
		return $this->constants;
34
	}
35

                    
36
	public function appendConstant(iterators\phpConstant $phpConstant)100%
37
	{
38
		$this->constants[] = $phpConstant;
39

                    
40
		return $this->append($phpConstant);
41
	}
42

                    
43
	public function getMethods()100%
44
	{
45
		return $this->methods;
46
	}
47

                    
48
	public function getMethod($index)0%
49
	{
50
		return (isset($this->methods[$index]) === false ? null : $this->methods[$index]);
51
	}
52

                    
53
	public function appendMethod(iterators\phpMethod $phpMethod)100%
54
	{
55
		$this->methods[] = $phpMethod;
56

                    
57
		return $this->append($phpMethod);
58
	}
59

                    
60
	public function getProperties()100%
61
	{
62
		return $this->properties;
63
	}
64

                    
65
	public function getProperty($index)0%
66
	{
67
		return (isset($this->properties[$index]) === false ? null : $this->properties[$index]);
68
	}
69

                    
70
	public function appendProperty(iterators\phpProperty $phpProperty)100%
71
	{
72
		$this->properties[] = $phpProperty;
73

                    
74
		return $this->append($phpProperty);
75
	}
76
}