Skip to content

Commit 2d6fa0c

Browse files
committed
Update bcmath parameter names
1 parent 40bd395 commit 2d6fa0c

9 files changed

+27
-31
lines changed

ext/bcmath/bcmath.stub.php

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,22 +2,22 @@
22

33
/** @generate-function-entries */
44

5-
function bcadd(string $left_operand, string $right_operand, ?int $scale = null): string {}
5+
function bcadd(string $num1, string $num2, ?int $scale = null): string {}
66

7-
function bcsub(string $left_operand, string $right_operand, ?int $scale = null): string {}
7+
function bcsub(string $num1, string $num2, ?int $scale = null): string {}
88

9-
function bcmul(string $left_operand, string $right_operand, ?int $scale = null): string {}
9+
function bcmul(string $num1, string $num2, ?int $scale = null): string {}
1010

11-
function bcdiv(string $dividend, string $divisor, ?int $scale = null): string {}
11+
function bcdiv(string $num1, string $num2, ?int $scale = null): string {}
1212

13-
function bcmod(string $dividend, string $divisor, ?int $scale = null): string {}
13+
function bcmod(string $num1, string $num2, ?int $scale = null): string {}
1414

15-
function bcpowmod(string $base, string $exponent, string $modulus, ?int $scale = null): string {}
15+
function bcpowmod(string $base, string $exp, string $mod, ?int $scale = null): string {}
1616

17-
function bcpow(string $base, string $exponent, ?int $scale = null): string {}
17+
function bcpow(string $base, string $exp, ?int $scale = null): string {}
1818

19-
function bcsqrt(string $operand, ?int $scale = null): string {}
19+
function bcsqrt(string $num, ?int $scale = null): string {}
2020

21-
function bccomp(string $left_operand, string $right_operand, ?int $scale = null): int {}
21+
function bccomp(string $num1, string $num2, ?int $scale = null): int {}
2222

2323
function bcscale(?int $scale = null): int {}

ext/bcmath/bcmath_arginfo.h

Lines changed: 11 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,45 +1,41 @@
11
/* This is a generated file, edit the .stub.php file instead.
2-
* Stub hash: a1e223f29a06a2292a88c0e90e104cb956f80500 */
2+
* Stub hash: 39f4f9ccb85c835b6949347f9dacbbcd8a58142b */
33

44
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_bcadd, 0, 2, IS_STRING, 0)
5-
ZEND_ARG_TYPE_INFO(0, left_operand, IS_STRING, 0)
6-
ZEND_ARG_TYPE_INFO(0, right_operand, IS_STRING, 0)
5+
ZEND_ARG_TYPE_INFO(0, num1, IS_STRING, 0)
6+
ZEND_ARG_TYPE_INFO(0, num2, IS_STRING, 0)
77
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, scale, IS_LONG, 1, "null")
88
ZEND_END_ARG_INFO()
99

1010
#define arginfo_bcsub arginfo_bcadd
1111

1212
#define arginfo_bcmul arginfo_bcadd
1313

14-
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_bcdiv, 0, 2, IS_STRING, 0)
15-
ZEND_ARG_TYPE_INFO(0, dividend, IS_STRING, 0)
16-
ZEND_ARG_TYPE_INFO(0, divisor, IS_STRING, 0)
17-
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, scale, IS_LONG, 1, "null")
18-
ZEND_END_ARG_INFO()
14+
#define arginfo_bcdiv arginfo_bcadd
1915

20-
#define arginfo_bcmod arginfo_bcdiv
16+
#define arginfo_bcmod arginfo_bcadd
2117

2218
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_bcpowmod, 0, 3, IS_STRING, 0)
2319
ZEND_ARG_TYPE_INFO(0, base, IS_STRING, 0)
24-
ZEND_ARG_TYPE_INFO(0, exponent, IS_STRING, 0)
25-
ZEND_ARG_TYPE_INFO(0, modulus, IS_STRING, 0)
20+
ZEND_ARG_TYPE_INFO(0, exp, IS_STRING, 0)
21+
ZEND_ARG_TYPE_INFO(0, mod, IS_STRING, 0)
2622
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, scale, IS_LONG, 1, "null")
2723
ZEND_END_ARG_INFO()
2824

2925
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_bcpow, 0, 2, IS_STRING, 0)
3026
ZEND_ARG_TYPE_INFO(0, base, IS_STRING, 0)
31-
ZEND_ARG_TYPE_INFO(0, exponent, IS_STRING, 0)
27+
ZEND_ARG_TYPE_INFO(0, exp, IS_STRING, 0)
3228
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, scale, IS_LONG, 1, "null")
3329
ZEND_END_ARG_INFO()
3430

3531
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_bcsqrt, 0, 1, IS_STRING, 0)
36-
ZEND_ARG_TYPE_INFO(0, operand, IS_STRING, 0)
32+
ZEND_ARG_TYPE_INFO(0, num, IS_STRING, 0)
3733
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, scale, IS_LONG, 1, "null")
3834
ZEND_END_ARG_INFO()
3935

4036
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_bccomp, 0, 2, IS_LONG, 0)
41-
ZEND_ARG_TYPE_INFO(0, left_operand, IS_STRING, 0)
42-
ZEND_ARG_TYPE_INFO(0, right_operand, IS_STRING, 0)
37+
ZEND_ARG_TYPE_INFO(0, num1, IS_STRING, 0)
38+
ZEND_ARG_TYPE_INFO(0, num2, IS_STRING, 0)
4339
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, scale, IS_LONG, 1, "null")
4440
ZEND_END_ARG_INFO()
4541

ext/bcmath/tests/bcpow_error1.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,4 @@ try {
1313
}
1414
?>
1515
--EXPECT--
16-
bcpow(): Argument #2 ($exponent) cannot have a fractional part
16+
bcpow(): Argument #2 ($exp) cannot have a fractional part

ext/bcmath/tests/bcpow_error2.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,4 @@ try {
1313
}
1414
?>
1515
--EXPECT--
16-
bcpow(): Argument #2 ($exponent) is too large
16+
bcpow(): Argument #2 ($exp) is too large

ext/bcmath/tests/bcpowmod_negative_exponent.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,4 @@ try {
1313
}
1414
?>
1515
--EXPECT--
16-
bcpowmod(): Argument #2 ($exponent) must be greater than or equal to 0
16+
bcpowmod(): Argument #2 ($exp) must be greater than or equal to 0

ext/bcmath/tests/bcsqrt_error1.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,4 @@ try {
1414
}
1515
?>
1616
--EXPECT--
17-
bcsqrt(): Argument #1 ($operand) must be greater than or equal to 0
17+
bcsqrt(): Argument #1 ($num) must be greater than or equal to 0

ext/bcmath/tests/bug72093.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,4 +19,4 @@ try {
1919
?>
2020
--EXPECT--
2121
bcpowmod(): Argument #4 ($scale) must be between 0 and 2147483647
22-
bcpowmod(): Argument #2 ($exponent) cannot have a fractional part
22+
bcpowmod(): Argument #2 ($exp) cannot have a fractional part

ext/bcmath/tests/bug75178.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,4 +19,4 @@ try {
1919
?>
2020
--EXPECT--
2121
bcpowmod(): Argument #1 ($base) cannot have a fractional part
22-
bcpowmod(): Argument #3 ($modulus) cannot have a fractional part
22+
bcpowmod(): Argument #3 ($mod) cannot have a fractional part

ext/bcmath/tests/bug78878.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,4 @@ try {
1313
}
1414
?>
1515
--EXPECT--
16-
bcpowmod(): Argument #3 ($modulus) cannot have a fractional part
16+
bcpowmod(): Argument #3 ($mod) cannot have a fractional part

0 commit comments

Comments
 (0)