@@ -14,7 +14,7 @@ class BigInt extends BigNum {
1414 /**
1515 * Creates a new BigInt instance
1616 *
17- * @param string in
17+ * @param int|float| string $ in
1818 */
1919 public function __construct ($ in ) {
2020 $ this ->num = substr ($ in , 0 , strcspn ($ in , '. ' ));
@@ -23,8 +23,8 @@ public function __construct($in) {
2323 /**
2424 * +
2525 *
26- * @param var other
27- * @return math.BigNum
26+ * @param math.BigNum|int|float|string $ other
27+ * @return math.BigNum
2828 */
2929 public function add ($ other ) {
3030 if ($ other instanceof self) {
@@ -41,8 +41,8 @@ public function add($other) {
4141 /**
4242 * -
4343 *
44- * @param var other
45- * @return math.BigNum
44+ * @param math.BigNum|int|float|string $ other
45+ * @return math.BigNum
4646 */
4747 public function subtract ($ other ) {
4848 if ($ other instanceof self) {
@@ -59,8 +59,8 @@ public function subtract($other) {
5959 /**
6060 * *
6161 *
62- * @param var other
63- * @return math.BigNum
62+ * @param math.BigNum|int|float|string $ other
63+ * @return math.BigNum
6464 */
6565 public function multiply ($ other ) {
6666 if ($ other instanceof self) {
@@ -77,8 +77,8 @@ public function multiply($other) {
7777 /**
7878 * /
7979 *
80- * @param var other
81- * @return math.BigNum
80+ * @param math.BigNum|int|float|string $ other
81+ * @return math.BigNum
8282 */
8383 public function divide ($ other ) {
8484 try {
@@ -119,8 +119,8 @@ public function divide($other) {
119119 /**
120120 * +(0), strictly integer addition
121121 *
122- * @param var other
123- * @return math.BigNum
122+ * @param math.BigNum|int|float|string $ other
123+ * @return math.BigNum
124124 */
125125 public function add0 ($ other ) {
126126 return new self (bcadd ($ this ->num , $ other instanceof parent ? $ other ->num : $ other , 0 ));
@@ -129,8 +129,8 @@ public function add0($other) {
129129 /**
130130 * -(0), strictly integer subtraction
131131 *
132- * @param var other
133- * @return math.BigNum
132+ * @param math.BigNum|int|float|string $ other
133+ * @return math.BigNum
134134 */
135135 public function subtract0 ($ other ) {
136136 return new self (bcsub ($ this ->num , $ other instanceof parent ? $ other ->num : $ other , 0 ));
@@ -139,8 +139,8 @@ public function subtract0($other) {
139139 /**
140140 * *(0), strictly integer multiplication
141141 *
142- * @param var other
143- * @return math.BigNum
142+ * @param math.BigNum|int|float|string $ other
143+ * @return math.BigNum
144144 */
145145 public function multiply0 ($ other ) {
146146 return new self (bcmul ($ this ->num , $ other instanceof self ? $ other ->num : $ other , 0 ));
@@ -149,8 +149,8 @@ public function multiply0($other) {
149149 /**
150150 * /
151151 *
152- * @param var other
153- * @return math.BigNum
152+ * @param math.BigNum|int|float|string $ other
153+ * @return math.BigNum
154154 */
155155 public function divide0 ($ other ) {
156156 try {
@@ -169,8 +169,8 @@ public function divide0($other) {
169169 * ^
170170 *
171171 * @see http://en.wikipedia.org/wiki/Exponentiation
172- * @param var other
173- * @return math.BigNum
172+ * @param math.BigNum|int|float|string $ other
173+ * @return math.BigNum
174174 */
175175 public function power ($ other ) {
176176 if ($ other instanceof self) {
@@ -193,8 +193,8 @@ public function power($other) {
193193 /**
194194 * %
195195 *
196- * @param var other
197- * @return math.BigNum
196+ * @param math.BigNum|int|float|string $ other
197+ * @return math.BigNum
198198 */
199199 public function modulo ($ other ) {
200200 try {
@@ -212,8 +212,8 @@ public function modulo($other) {
212212 /**
213213 * &
214214 *
215- * @param var other
216- * @return math.BigNum
215+ * @param math.BigNum|int|float|string $ other
216+ * @return math.BigNum
217217 */
218218 public function bitwiseAnd ($ other ) {
219219 $ a = self ::bytesOf ($ this ->num );
@@ -225,8 +225,8 @@ public function bitwiseAnd($other) {
225225 /**
226226 * |
227227 *
228- * @param var other
229- * @return math.BigNum
228+ * @param math.BigNum|int|float|string $ other
229+ * @return math.BigNum
230230 */
231231 public function bitwiseOr ($ other ) {
232232 $ a = self ::bytesOf ($ this ->num );
@@ -238,8 +238,8 @@ public function bitwiseOr($other) {
238238 /**
239239 * ^
240240 *
241- * @param var other
242- * @return math.BigNum
241+ * @param math.BigNum|int|float|string $ other
242+ * @return math.BigNum
243243 */
244244 public function bitwiseXor ($ other ) {
245245 $ a = self ::bytesOf ($ this ->num );
@@ -252,7 +252,7 @@ public function bitwiseXor($other) {
252252 * >>
253253 *
254254 * @param var shift
255- * @return math.BigNum
255+ * @return math.BigNum
256256 */
257257 public function shiftRight ($ shift ) {
258258 return new self (bcdiv ($ this ->num , bcpow (2 , $ shift instanceof self ? $ shift ->num : $ shift , 0 ), 0 ));
@@ -262,7 +262,7 @@ public function shiftRight($shift) {
262262 * <<
263263 *
264264 * @param var shift
265- * @return math.BigNum
265+ * @return math.BigNum
266266 */
267267 public function shiftLeft ($ shift ) {
268268 return new self (bcmul ($ this ->num , bcpow (2 , $ shift instanceof self ? $ shift ->num : $ shift , 0 ), 0 ));
@@ -273,7 +273,7 @@ public function shiftLeft($shift) {
273273 *
274274 * @see xp://math.BigNum#toBytes
275275 * @param string bytes
276- * @return math.BigNum
276+ * @return math.BigNum
277277 */
278278 protected static function fromBytes ($ bytes ) {
279279 $ len = strlen ($ bytes );
@@ -294,7 +294,7 @@ protected static function fromBytes($bytes) {
294294 * Creates sequence of bytes from a bignum
295295 *
296296 * @see xp://math.BigNum#fromBytes
297- * @return string
297+ * @return string
298298 */
299299 protected static function bytesOf ($ n ) {
300300 $ value = '' ;
@@ -308,7 +308,7 @@ protected static function bytesOf($n) {
308308 /**
309309 * Returns an byte representing this big integer
310310 *
311- * @return int
311+ * @return int
312312 */
313313 public function byteValue () {
314314 return $ this ->bitwiseAnd (0xFF )->intValue ();
0 commit comments