From ce1d69a1f6dcf15d43029301059c25e5bc09a577 Mon Sep 17 00:00:00 2001 From: Gabriel Caruso Date: Sun, 4 Feb 2018 11:33:49 -0200 Subject: 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". --- ext/gmp/tests/gmp_pow.phpt | 4 ++-- ext/gmp/tests/gmp_random.phpt | 6 +++--- ext/gmp/tests/gmp_strval.phpt | 8 ++++---- 3 files changed, 9 insertions(+), 9 deletions(-) (limited to 'ext/gmp') 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 -- cgit v1.2.1