@@ -10,6 +10,9 @@ |
||
| 10 | 10 | class ImmutableNumber extends Number implements NumberInterface, DecimalInterface |
| 11 | 11 | {
|
| 12 | 12 | |
| 13 | + /** |
|
| 14 | + * @param ImmutableNumber $mod |
|
| 15 | + */ |
|
| 13 | 16 | public function modulo($mod) |
| 14 | 17 | {
|
| 15 | 18 | $oldBase = $this->convertForModification(); |
@@ -178,7 +178,7 @@ |
||
| 178 | 178 | } |
| 179 | 179 | |
| 180 | 180 | /** |
| 181 | - * @param int|float|DecimalInterface $min |
|
| 181 | + * @param integer $min |
|
| 182 | 182 | * @param int|float|DecimalInterface $max |
| 183 | 183 | * @param int $maxIterations |
| 184 | 184 | * |
@@ -163,7 +163,7 @@ |
||
| 163 | 163 | * WARNING: This function is of very limited use with Poisson distributions, and may represent a SIGNIFICANT |
| 164 | 164 | * performance hit for certain values of $min, $max, $lambda, and $maxIterations |
| 165 | 165 | * |
| 166 | - * @param int|float|NumberInterface $min |
|
| 166 | + * @param integer $min |
|
| 167 | 167 | * @param int|float|NumberInterface $max |
| 168 | 168 | * @param int $maxIterations |
| 169 | 169 | * |
@@ -24,6 +24,10 @@ |
||
| 24 | 24 | */ |
| 25 | 25 | protected $denominator; |
| 26 | 26 | |
| 27 | + /** |
|
| 28 | + * @param ImmutableNumber $numerator |
|
| 29 | + * @param ImmutableNumber $denominator |
|
| 30 | + */ |
|
| 27 | 31 | public function __construct($numerator, $denominator, $base = 10) |
| 28 | 32 | { |
| 29 | 33 | |
@@ -28,6 +28,9 @@ discard block |
||
| 28 | 28 | |
| 29 | 29 | protected $extensions = true; |
| 30 | 30 | |
| 31 | + /** |
|
| 32 | + * @param integer $precision |
|
| 33 | + */ |
|
| 31 | 34 | public function __construct($value, $precision = null, $base = 10) |
| 32 | 35 | {
|
| 33 | 36 | $this->base = $base; |
@@ -148,7 +151,7 @@ discard block |
||
| 148 | 151 | * Note about precision: it uses the smaller of the two precisions (significant figures). |
| 149 | 152 | * |
| 150 | 153 | * @param $num |
| 151 | - * @param $precision |
|
| 154 | + * @param integer $precision |
|
| 152 | 155 | * @return DecimalInterface|NumberInterface |
| 153 | 156 | */ |
| 154 | 157 | public function divide($num, $precision = null) |
@@ -1011,6 +1014,9 @@ discard block |
||
| 1011 | 1014 | |
| 1012 | 1015 | } |
| 1013 | 1016 | |
| 1017 | + /** |
|
| 1018 | + * @param ImmutableNumber $num |
|
| 1019 | + */ |
|
| 1014 | 1020 | public function getGreatestCommonDivisor($num) |
| 1015 | 1021 | {
|
| 1016 | 1022 | /** @var ImmutableNumber $num */ |
@@ -1405,6 +1411,10 @@ discard block |
||
| 1405 | 1411 | return strpos($this->value, '.'); |
| 1406 | 1412 | } |
| 1407 | 1413 | |
| 1414 | + /** |
|
| 1415 | + * @param integer $pos |
|
| 1416 | + * @param integer $add |
|
| 1417 | + */ |
|
| 1408 | 1418 | protected function reduceDecimals(array $decimalArray, $pos, $add) |
| 1409 | 1419 | {
|
| 1410 | 1420 | |
@@ -1454,9 +1464,9 @@ discard block |
||
| 1454 | 1464 | abstract public function modulo($mod); |
| 1455 | 1465 | |
| 1456 | 1466 | /** |
| 1457 | - * @param $mod |
|
| 1467 | + * @param NumberInterface $mod |
|
| 1458 | 1468 | * |
| 1459 | - * @return NumberInterface|DecimalInterface |
|
| 1469 | + * @return NumberInterface |
|
| 1460 | 1470 | */ |
| 1461 | 1471 | abstract public function continuousModulo($mod); |
| 1462 | 1472 | |
@@ -158,7 +158,7 @@ |
||
| 158 | 158 | } |
| 159 | 159 | |
| 160 | 160 | /** |
| 161 | - * @param int|float|NumberInterface $min |
|
| 161 | + * @param integer $min |
|
| 162 | 162 | * @param int|float|NumberInterface $max |
| 163 | 163 | * @param int $maxIterations |
| 164 | 164 | * |