@@ -14,7 +14,6 @@ |
||
14 | 14 | use Asylamba\Modules\Demeter\Model\Forum\ForumTopic; |
15 | 15 | use Asylamba\Modules\Demeter\Model\Election\Vote; |
16 | 16 | use Asylamba\Modules\Demeter\Model\Color; |
17 | -use Asylamba\Modules\Demeter\Resource\ColorResource; |
|
18 | 17 | |
19 | 18 | $rElection = Utils::getHTTPData('relection'); |
20 | 19 | $program = Utils::getHTTPData('program'); |
@@ -24,7 +24,7 @@ |
||
24 | 24 | |
25 | 25 | /** |
26 | 26 | * @param string $key |
27 | - * @return boolean |
|
27 | + * @return false|null |
|
28 | 28 | */ |
29 | 29 | public function remove($key) { |
30 | 30 | if (!isset($this->elements[$key])) { |
@@ -54,7 +54,7 @@ |
||
54 | 54 | * @param string $system |
55 | 55 | * @param string $img |
56 | 56 | * @param string $type |
57 | - * @return boolean |
|
57 | + * @return false|null |
|
58 | 58 | */ |
59 | 59 | public function addBase($key, $id, $name, $sector, $system, $img, $type) { |
60 | 60 | if ($this->exist('playerBase')) { |
@@ -69,7 +69,6 @@ |
||
69 | 69 | } |
70 | 70 | |
71 | 71 | /** |
72 | - * @param mixed $element |
|
73 | 72 | */ |
74 | 73 | public function append($value) { |
75 | 74 | $this->elements[] = $value; |
@@ -73,6 +73,10 @@ |
||
73 | 73 | $this->precision = 3; |
74 | 74 | } |
75 | 75 | |
76 | + /** |
|
77 | + * @param string $mode |
|
78 | + * @param integer $precision |
|
79 | + */ |
|
76 | 80 | protected function formatTime($mode, $precision) { |
77 | 81 | switch ($mode) { |
78 | 82 | case 'mcs': $formatTime = $this->rTime * 1000000; |
@@ -43,6 +43,9 @@ |
||
43 | 43 | } |
44 | 44 | } |
45 | 45 | |
46 | + /** |
|
47 | + * @param string $content |
|
48 | + */ |
|
46 | 49 | public static function writeLog($target, $content) { |
47 | 50 | file_put_contents($target, $content . "\n\r", FILE_APPEND); |
48 | 51 | } |
@@ -60,6 +60,9 @@ discard block |
||
60 | 60 | } |
61 | 61 | } |
62 | 62 | |
63 | + /** |
|
64 | + * @param string $date |
|
65 | + */ |
|
63 | 66 | private static function getRel($date) { |
64 | 67 | $origin = strtotime(Chronos::REAL_TIME); |
65 | 68 | $date = strtotime($date); |
@@ -92,6 +95,9 @@ discard block |
||
92 | 95 | return '<span class="hb lt" title="' . $title . '">' . $return . '</span>'; |
93 | 96 | } |
94 | 97 | |
98 | + /** |
|
99 | + * @param double $seconds |
|
100 | + */ |
|
95 | 101 | public static function secondToFormat($seconds, $format = 'large') { |
96 | 102 | $return = ''; |
97 | 103 | $rel = floor($seconds / 3600); |
@@ -26,6 +26,9 @@ discard block |
||
26 | 26 | } |
27 | 27 | } |
28 | 28 | |
29 | + /** |
|
30 | + * @param integer $nbr |
|
31 | + */ |
|
29 | 32 | public static function ordinalNumber($nbr) { |
30 | 33 | switch ($nbr) { |
31 | 34 | case 1: |
@@ -107,6 +110,9 @@ discard block |
||
107 | 110 | } |
108 | 111 | } |
109 | 112 | |
113 | + /** |
|
114 | + * @param string $action |
|
115 | + */ |
|
110 | 116 | public static function actionBuilder($action, $params = array(), $hasRoot = TRUE) { |
111 | 117 | $url = ''; |
112 | 118 | if ($hasRoot) { |
@@ -41,6 +41,10 @@ discard block |
||
41 | 41 | } |
42 | 42 | } |
43 | 43 | |
44 | + /** |
|
45 | + * @param integer $xCoord |
|
46 | + * @param integer $yCoord |
|
47 | + */ |
|
44 | 48 | public static function formatCoord($xCoord, $yCoord, $planetPosition = 0, $sectorLocation = 0) { |
45 | 49 | if ($sectorLocation > 0) { |
46 | 50 | return '⟨' . $sectorLocation . '⟩ ' . $xCoord . ':' . $yCoord . ':' . $planetPosition . ''; |
@@ -51,6 +55,9 @@ discard block |
||
51 | 55 | } |
52 | 56 | } |
53 | 57 | |
58 | + /** |
|
59 | + * @param integer $coeffPlanet |
|
60 | + */ |
|
54 | 61 | public static function resourceProduction($coeffRefinery, $coeffPlanet) { |
55 | 62 | return $coeffRefinery * $coeffPlanet; |
56 | 63 | } |
@@ -130,6 +137,9 @@ discard block |
||
130 | 137 | return $tax; |
131 | 138 | } |
132 | 139 | |
140 | + /** |
|
141 | + * @param integer $mode |
|
142 | + */ |
|
133 | 143 | public static function getAntiSpyRadius($investment, $mode = ANTISPY_DISPLAY_MODE) { |
134 | 144 | return $mode == ANTISPY_DISPLAY_MODE |
135 | 145 | # en pixels : sert à l'affichage |
@@ -278,6 +288,9 @@ discard block |
||
278 | 288 | } |
279 | 289 | } |
280 | 290 | |
291 | + /** |
|
292 | + * @param integer $price |
|
293 | + */ |
|
281 | 294 | public static function calculateRate($transactionType, $quantity, $identifier, $price) { |
282 | 295 | switch ($transactionType) { |
283 | 296 | case Transaction::TYP_RESOURCE : |
@@ -3,15 +3,11 @@ |
||
3 | 3 | namespace Asylamba\Classes\Library; |
4 | 4 | |
5 | 5 | use Asylamba\Modules\Ares\Model\Commander; |
6 | - |
|
7 | 6 | use Asylamba\Modules\Athena\Model\CommercialRoute; |
8 | 7 | use Asylamba\Modules\Athena\Model\Transaction; |
9 | 8 | use Asylamba\Modules\Athena\Resource\ShipResource; |
10 | - |
|
11 | 9 | use Asylamba\Modules\Gaia\Resource\PlaceResource; |
12 | - |
|
13 | 10 | use Asylamba\Modules\Artemis\Model\SpyReport; |
14 | - |
|
15 | 11 | use Asylamba\Modules\Zeus\Model\PlayerBonus; |
16 | 12 | |
17 | 13 |