Passed
Push — master ( 4dc177...3651e5 )
by Nico
02:23
created

CoC_Member::getDonations()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %
Metric Value
dl 0
loc 4
rs 10
cc 1
eloc 2
nc 1
nop 0
1
<?php
2
3
class CoC_Member
4
{
5
	protected $memberObj;
6
7
	/**
8
	 * Constructor of CoC_Member
9
	 * 
10
	 * @param $memberObj, obtained by Clan.class.php
11
	 */
12
	public function __construct($memberObj)
13
	{
14
		$this->memberObj = $memberObj;
15
	}
16
17
	/**
18
	 * Gets the members name
19
	 *
20
	 * @return string, name
0 ignored issues
show
Documentation introduced by
The doc-type string, could not be parsed: Expected "|" or "end of type", but got "," at position 6. (view supported doc-types)

This check marks PHPDoc comments that could not be parsed by our parser. To see which comment annotations we can parse, please refer to our documentation on supported doc-types.

Loading history...
21
	 */
22
	public function getName()
23
	{
24
		return $this->memberObj->name;
25
	}
26
27
	/**
28
	 * Gets the members role ("member", "admin", "coLeader", "leader")
29
	 *
30
	 * @return string, role
0 ignored issues
show
Documentation introduced by
The doc-type string, could not be parsed: Expected "|" or "end of type", but got "," at position 6. (view supported doc-types)

This check marks PHPDoc comments that could not be parsed by our parser. To see which comment annotations we can parse, please refer to our documentation on supported doc-types.

Loading history...
31
	 */
32
	public function getRole()
33
	{
34
		return $this->memberObj->role;
35
	}
36
37
	/**
38
	 * Gets the members level
39
	 *
40
	 * @return int, level
0 ignored issues
show
Documentation introduced by
The doc-type int, could not be parsed: Expected "|" or "end of type", but got "," at position 3. (view supported doc-types)

This check marks PHPDoc comments that could not be parsed by our parser. To see which comment annotations we can parse, please refer to our documentation on supported doc-types.

Loading history...
41
	 */
42
	public function getLevel()
43
	{
44
		return $this->memberObj->expLevel;
45
	}
46
47
	/**
48
	 * Gets the members league ID
49
	 *
50
	 * @return int, league ID
0 ignored issues
show
Documentation introduced by
The doc-type int, could not be parsed: Expected "|" or "end of type", but got "," at position 3. (view supported doc-types)

This check marks PHPDoc comments that could not be parsed by our parser. To see which comment annotations we can parse, please refer to our documentation on supported doc-types.

Loading history...
51
	 */
52
	public function getLeagueId()
53
	{
54
		return $this->memberObj->league->id;
55
	}
56
57
	/**
58
	 * Gets the members league
59
 	 *
60
 	 * @return stdClass
61
 	 */
62
	public function getLeague()
63
	{
64
		return $this->memberObj->league;
65
	}
66
67
	/**
68
	 * Gets the members trophy-count
69
	 *
70
	 * @return int, trophies
0 ignored issues
show
Documentation introduced by
The doc-type int, could not be parsed: Expected "|" or "end of type", but got "," at position 3. (view supported doc-types)

This check marks PHPDoc comments that could not be parsed by our parser. To see which comment annotations we can parse, please refer to our documentation on supported doc-types.

Loading history...
71
	 */
72
	public function getTrophies()
73
	{
74
		return $this->memberObj->trophies;
75
	}
76
77
	/**
78
	 * Gets the members rank inside the clan-ranklist
79
	 *
80
	 * @return int, rank
0 ignored issues
show
Documentation introduced by
The doc-type int, could not be parsed: Expected "|" or "end of type", but got "," at position 3. (view supported doc-types)

This check marks PHPDoc comments that could not be parsed by our parser. To see which comment annotations we can parse, please refer to our documentation on supported doc-types.

Loading history...
81
	 */
82
	public function getClanRank()
83
	{
84
		return $this->memberObj->clanRank;
85
	}
86
87
	/**
88
	 * Gets the members previous rank inside the clan-ranklist
89
	 *
90
	 * @return int, rank
0 ignored issues
show
Documentation introduced by
The doc-type int, could not be parsed: Expected "|" or "end of type", but got "," at position 3. (view supported doc-types)

This check marks PHPDoc comments that could not be parsed by our parser. To see which comment annotations we can parse, please refer to our documentation on supported doc-types.

Loading history...
91
	 */
92
	public function getPreviousClanRank()
93
	{
94
		return $this->memberObj->previousClanRank;
95
	}
96
97
	/**
98
	 * Gets the amount of donations done by the member
99
	 *
100
	 * @return int, donations
0 ignored issues
show
Documentation introduced by
The doc-type int, could not be parsed: Expected "|" or "end of type", but got "," at position 3. (view supported doc-types)

This check marks PHPDoc comments that could not be parsed by our parser. To see which comment annotations we can parse, please refer to our documentation on supported doc-types.

Loading history...
101
	 */
102
	public function getDonations()
103
	{
104
		return $this->memberObj->donations;
105
	}
106
107
	/**
108
	 * Gets the amount of donations received by the member
109
	 *
110
	 * @return int, donations
0 ignored issues
show
Documentation introduced by
The doc-type int, could not be parsed: Expected "|" or "end of type", but got "," at position 3. (view supported doc-types)

This check marks PHPDoc comments that could not be parsed by our parser. To see which comment annotations we can parse, please refer to our documentation on supported doc-types.

Loading history...
111
	 */
112
	public function getDonationsReceived()
113
	{
114
		return $this->memberObj->donationsReceived;
115
	}
116
}
117
118
?>
0 ignored issues
show
Best Practice introduced by
It is not recommended to use PHP's closing tag ?> in files other than templates.

Using a closing tag in PHP files that only contain PHP code is not recommended as you might accidentally add whitespace after the closing tag which would then be output by PHP. This can cause severe problems, for example headers cannot be sent anymore.

A simple precaution is to leave off the closing tag as it is not required, and it also has no negative effects whatsoever.

Loading history...