summaryrefslogtreecommitdiff
path: root/ext/gmp
diff options
context:
space:
mode:
authorGabriel Caruso <carusogabriel34@gmail.com>2018-02-04 11:33:49 -0200
committerNikita Popov <nikita.ppv@gmail.com>2018-02-04 19:08:23 +0100
commitce1d69a1f6dcf15d43029301059c25e5bc09a577 (patch)
tree3df785771b4bfa07a9e270b04750840ed47f1cbf /ext/gmp
parent4861730a945908208a049b0c037ddf4a339f999a (diff)
downloadphp-git-ce1d69a1f6dcf15d43029301059c25e5bc09a577.tar.gz
Use int instead of integer in type errors
PHP requires integer typehints to be written "int" and does not allow "integer" as an alias. This changes type error messages to match the actual type name and avoids confusing messages like "must be of the type integer, integer given".
Diffstat (limited to 'ext/gmp')
-rw-r--r--ext/gmp/tests/gmp_pow.phpt4
-rw-r--r--ext/gmp/tests/gmp_random.phpt6
-rw-r--r--ext/gmp/tests/gmp_strval.phpt8
3 files changed, 9 insertions, 9 deletions
diff --git a/ext/gmp/tests/gmp_pow.phpt b/ext/gmp/tests/gmp_pow.phpt
index 6140b0cebf..b1b7b7d57e 100644
--- a/ext/gmp/tests/gmp_pow.phpt
+++ b/ext/gmp/tests/gmp_pow.phpt
@@ -57,10 +57,10 @@ NULL
Warning: gmp_pow() expects exactly 2 parameters, 0 given in %s on line %d
NULL
-Warning: gmp_pow() expects parameter 2 to be integer, array given in %s on line %d
+Warning: gmp_pow() expects parameter 2 to be int, array given in %s on line %d
NULL
-Warning: gmp_pow() expects parameter 2 to be integer, array given in %s on line %d
+Warning: gmp_pow() expects parameter 2 to be int, array given in %s on line %d
NULL
Warning: gmp_pow(): Unable to convert variable to GMP - wrong type in %s on line %d
diff --git a/ext/gmp/tests/gmp_random.phpt b/ext/gmp/tests/gmp_random.phpt
index da4ca5c7bd..5533224b2c 100644
--- a/ext/gmp/tests/gmp_random.phpt
+++ b/ext/gmp/tests/gmp_random.phpt
@@ -40,7 +40,7 @@ string(%d) "%d"
Deprecated: Function gmp_random() is deprecated in %s on line %d
-Warning: gmp_random() expects parameter 1 to be integer, array given in %s on line %d
+Warning: gmp_random() expects parameter 1 to be int, array given in %s on line %d
NULL
Deprecated: Function gmp_random() is deprecated in %s on line %d
@@ -50,11 +50,11 @@ NULL
Deprecated: Function gmp_random() is deprecated in %s on line %d
-Warning: gmp_random() expects parameter 1 to be integer, string given in %s on line %d
+Warning: gmp_random() expects parameter 1 to be int, string given in %s on line %d
NULL
Deprecated: Function gmp_random() is deprecated in %s on line %d
-Warning: gmp_random() expects parameter 1 to be integer, string given in %s on line %d
+Warning: gmp_random() expects parameter 1 to be int, string given in %s on line %d
NULL
Done
diff --git a/ext/gmp/tests/gmp_strval.phpt b/ext/gmp/tests/gmp_strval.phpt
index df3e596a19..4df78bdf7a 100644
--- a/ext/gmp/tests/gmp_strval.phpt
+++ b/ext/gmp/tests/gmp_strval.phpt
@@ -40,13 +40,13 @@ NULL
Warning: gmp_strval(): Unable to convert variable to GMP - string is not an integer in %s on line %d
bool(false)
-Warning: gmp_strval() expects parameter 2 to be integer, string given in %s on line %d
+Warning: gmp_strval() expects parameter 2 to be int, string given in %s on line %d
NULL
Warning: gmp_strval(): Bad base for conversion: -1 (should be between 2 and %d or -2 and -%d) in %s on line %d
bool(false)
-Warning: gmp_strval() expects parameter 2 to be integer, string given in %s on line %d
+Warning: gmp_strval() expects parameter 2 to be int, string given in %s on line %d
NULL
Warning: gmp_strval(): Unable to convert variable to GMP - wrong type in %s on line %d
@@ -68,10 +68,10 @@ Warning: gmp_strval(): Bad base for conversion: 100000 (should be between 2 and
bool(false)
string(8) "-3373333"
-Warning: gmp_strval() expects parameter 2 to be integer, array given in %s on line %d
+Warning: gmp_strval() expects parameter 2 to be int, array given in %s on line %d
NULL
-Warning: gmp_strval() expects parameter 2 to be integer, object given in %s on line %d
+Warning: gmp_strval() expects parameter 2 to be int, object given in %s on line %d
NULL
Warning: gmp_strval(): Unable to convert variable to GMP - wrong type in %s on line %d