1n9i9c7om /
ClashOfClans-API-PHP
This project does not seem to handle request data directly as such no vulnerable execution paths were found.
include, or for example
via PHP's auto-loading mechanism.
These results are based on our legacy PHP analysis, consider migrating to our new PHP analysis engine instead. Learn more
| 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 tag (id) |
||
| 19 | * |
||
| 20 | * @return string, tag |
||
|
0 ignored issues
–
show
|
|||
| 21 | */ |
||
| 22 | public function getTag() |
||
| 23 | { |
||
| 24 | return $this->memberObj->tag; |
||
| 25 | } |
||
| 26 | |||
| 27 | /** |
||
| 28 | * Gets the members name |
||
| 29 | * |
||
| 30 | * @return string, name |
||
|
0 ignored issues
–
show
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 getName() |
||
| 33 | { |
||
| 34 | return $this->memberObj->name; |
||
| 35 | } |
||
| 36 | |||
| 37 | /** |
||
| 38 | * Gets the members role ("member", "admin", "coLeader", "leader") |
||
| 39 | * |
||
| 40 | * @return string, role |
||
|
0 ignored issues
–
show
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...
|
|||
| 41 | */ |
||
| 42 | public function getRole() |
||
| 43 | { |
||
| 44 | return $this->memberObj->role; |
||
| 45 | } |
||
| 46 | |||
| 47 | /** |
||
| 48 | * Gets the members level |
||
| 49 | * |
||
| 50 | * @return int, level |
||
|
0 ignored issues
–
show
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 getLevel() |
||
| 53 | { |
||
| 54 | return $this->memberObj->expLevel; |
||
| 55 | } |
||
| 56 | |||
| 57 | /** |
||
| 58 | * Gets the members league ID |
||
| 59 | * |
||
| 60 | * @return int, league ID |
||
|
0 ignored issues
–
show
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...
|
|||
| 61 | */ |
||
| 62 | public function getLeagueId() |
||
| 63 | { |
||
| 64 | return $this->memberObj->league->id; |
||
| 65 | } |
||
| 66 | |||
| 67 | /** |
||
| 68 | * Gets the members league |
||
| 69 | * |
||
| 70 | * @return stdClass |
||
| 71 | */ |
||
| 72 | public function getLeague() |
||
| 73 | { |
||
| 74 | return $this->memberObj->league; |
||
| 75 | } |
||
| 76 | |||
| 77 | /** |
||
| 78 | * Gets the members trophy-count |
||
| 79 | * |
||
| 80 | * @return int, trophies |
||
|
0 ignored issues
–
show
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 getTrophies() |
||
| 83 | { |
||
| 84 | return $this->memberObj->trophies; |
||
| 85 | } |
||
| 86 | |||
| 87 | /** |
||
| 88 | * Gets the members rank inside the clan-ranklist |
||
| 89 | * |
||
| 90 | * @return int, rank |
||
|
0 ignored issues
–
show
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 getClanRank() |
||
| 93 | { |
||
| 94 | return $this->memberObj->clanRank; |
||
| 95 | } |
||
| 96 | |||
| 97 | /** |
||
| 98 | * Gets the members previous rank inside the clan-ranklist |
||
| 99 | * |
||
| 100 | * @return int, rank |
||
|
0 ignored issues
–
show
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 getPreviousClanRank() |
||
| 103 | { |
||
| 104 | return $this->memberObj->previousClanRank; |
||
| 105 | } |
||
| 106 | |||
| 107 | /** |
||
| 108 | * Gets the amount of donations done by the member |
||
| 109 | * |
||
| 110 | * @return int, donations |
||
|
0 ignored issues
–
show
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 getDonations() |
||
| 113 | { |
||
| 114 | return $this->memberObj->donations; |
||
| 115 | } |
||
| 116 | |||
| 117 | /** |
||
| 118 | * Gets the amount of donations received by the member |
||
| 119 | * |
||
| 120 | * @return int, donations |
||
|
0 ignored issues
–
show
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...
|
|||
| 121 | */ |
||
| 122 | public function getDonationsReceived() |
||
| 123 | { |
||
| 124 | return $this->memberObj->donationsReceived; |
||
| 125 | } |
||
| 126 | |||
| 127 | /** |
||
| 128 | * Gets the donation ratio of the member |
||
| 129 | * |
||
| 130 | * @return int, ratio |
||
|
0 ignored issues
–
show
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...
|
|||
| 131 | */ |
||
| 132 | public function getDonationsRatio() |
||
| 133 | { |
||
| 134 | return round($this->memberObj->donations / (float) max($this->memberObj->donationsReceived, 1), 2); |
||
| 135 | } |
||
| 136 | } |
||
| 137 | |||
| 138 | ?> |
||
|
0 ignored issues
–
show
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...
|
|||
| 139 |
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.