diff options
author | Gabriel Caruso <carusogabriel34@gmail.com> | 2018-02-04 11:33:49 -0200 |
---|---|---|
committer | Nikita Popov <nikita.ppv@gmail.com> | 2018-02-04 19:08:23 +0100 |
commit | ce1d69a1f6dcf15d43029301059c25e5bc09a577 (patch) | |
tree | 3df785771b4bfa07a9e270b04750840ed47f1cbf /ext/reflection | |
parent | 4861730a945908208a049b0c037ddf4a339f999a (diff) | |
download | php-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/reflection')
9 files changed, 15 insertions, 15 deletions
diff --git a/ext/reflection/tests/ReflectionClassConstant_basic1.phpt b/ext/reflection/tests/ReflectionClassConstant_basic1.phpt index fd8118650f..f85e95f26f 100644 --- a/ext/reflection/tests/ReflectionClassConstant_basic1.phpt +++ b/ext/reflection/tests/ReflectionClassConstant_basic1.phpt @@ -87,13 +87,13 @@ string(21) "/** My Doc comment */" Reflecting on class constant TestClass::PROT __toString(): -string(42) "Constant [ protected integer PROT ] { 4 } +string(38) "Constant [ protected int PROT ] { 4 } " export(): -string(42) "Constant [ protected integer PROT ] { 4 } +string(38) "Constant [ protected int PROT ] { 4 } " export(): -Constant [ protected integer PROT ] { 4 } +Constant [ protected int PROT ] { 4 } NULL getName(): diff --git a/ext/reflection/tests/ReflectionClassConstant_getValue.phpt b/ext/reflection/tests/ReflectionClassConstant_getValue.phpt index e447d15357..5ff0baf6e2 100644 --- a/ext/reflection/tests/ReflectionClassConstant_getValue.phpt +++ b/ext/reflection/tests/ReflectionClassConstant_getValue.phpt @@ -24,13 +24,13 @@ echo new ReflectionClass('C'); ?> --EXPECTF-- int(2) -Constant [ public integer X ] { 2 } +Constant [ public int X ] { 2 } Class [ <user> class C ] { @@ %s 12-15 - Constants [2] { - Constant [ public integer X ] { 2 } - Constant [ public integer Y ] { 1 } + Constant [ public int X ] { 2 } + Constant [ public int Y ] { 1 } } - Static properties [0] { diff --git a/ext/reflection/tests/ReflectionClass_export_array_bug72222.phpt b/ext/reflection/tests/ReflectionClass_export_array_bug72222.phpt index 9ccc285433..30694bf536 100644 --- a/ext/reflection/tests/ReflectionClass_export_array_bug72222.phpt +++ b/ext/reflection/tests/ReflectionClass_export_array_bug72222.phpt @@ -13,7 +13,7 @@ Class [ <user> class A ] { @@ %s 2-5 - Constants [2] { - Constant [ public integer A ] { 8 } + Constant [ public int A ] { 8 } Constant [ public array B ] { Array } } diff --git a/ext/reflection/tests/ReflectionClass_getMethods_002.phpt b/ext/reflection/tests/ReflectionClass_getMethods_002.phpt index fae86e1642..b6a78aa318 100644 --- a/ext/reflection/tests/ReflectionClass_getMethods_002.phpt +++ b/ext/reflection/tests/ReflectionClass_getMethods_002.phpt @@ -13,6 +13,6 @@ $rc->getMethods('X', true); ?> --EXPECTF-- Test invalid arguments: -Warning: ReflectionClass::getMethods() expects parameter 1 to be integer, string given in %s on line 4 +Warning: ReflectionClass::getMethods() expects parameter 1 to be int, string given in %s on line 4 Warning: ReflectionClass::getMethods() expects at most 1 parameter, 2 given in %s on line 5 diff --git a/ext/reflection/tests/ReflectionClass_getProperties_002.phpt b/ext/reflection/tests/ReflectionClass_getProperties_002.phpt index fc4d5648a4..1f7dc24d74 100644 --- a/ext/reflection/tests/ReflectionClass_getProperties_002.phpt +++ b/ext/reflection/tests/ReflectionClass_getProperties_002.phpt @@ -12,6 +12,6 @@ $rc->getProperties('X', true); ?> --EXPECTF-- Test invalid arguments: -Warning: ReflectionClass::getProperties() expects parameter 1 to be integer, string given in %s on line 4 +Warning: ReflectionClass::getProperties() expects parameter 1 to be int, string given in %s on line 4 Warning: ReflectionClass::getProperties() expects at most 1 parameter, 2 given in %s on line 5 diff --git a/ext/reflection/tests/ReflectionClass_toString_001.phpt b/ext/reflection/tests/ReflectionClass_toString_001.phpt index 179d63afad..fab6387e05 100644 --- a/ext/reflection/tests/ReflectionClass_toString_001.phpt +++ b/ext/reflection/tests/ReflectionClass_toString_001.phpt @@ -12,9 +12,9 @@ echo $rc; Class [ <internal:Reflection> class ReflectionClass implements Reflector ] { - Constants [3] { - Constant [ public integer IS_IMPLICIT_ABSTRACT ] { 16 } - Constant [ public integer IS_EXPLICIT_ABSTRACT ] { 32 } - Constant [ public integer IS_FINAL ] { 4 } + Constant [ public int IS_IMPLICIT_ABSTRACT ] { 16 } + Constant [ public int IS_EXPLICIT_ABSTRACT ] { 32 } + Constant [ public int IS_FINAL ] { 4 } } - Static properties [0] { diff --git a/ext/reflection/tests/ReflectionObject_constructor_error.phpt b/ext/reflection/tests/ReflectionObject_constructor_error.phpt index baa6129edf..71a1166b13 100644 --- a/ext/reflection/tests/ReflectionObject_constructor_error.phpt +++ b/ext/reflection/tests/ReflectionObject_constructor_error.phpt @@ -30,7 +30,7 @@ object(ReflectionObject)#%d (1) { string(0) "" } -Warning: ReflectionObject::__construct() expects parameter 1 to be object, integer given in %s on line 7 +Warning: ReflectionObject::__construct() expects parameter 1 to be object, int given in %s on line 7 object(ReflectionObject)#%d (1) { ["name"]=> string(0) "" diff --git a/ext/reflection/tests/ReflectionObject_isInstance_error.phpt b/ext/reflection/tests/ReflectionObject_isInstance_error.phpt index b0fb071e1f..f8f088057c 100644 --- a/ext/reflection/tests/ReflectionObject_isInstance_error.phpt +++ b/ext/reflection/tests/ReflectionObject_isInstance_error.phpt @@ -22,7 +22,7 @@ NULL Warning: ReflectionClass::isInstance() expects exactly 1 parameter, 2 given in %s on line 7 NULL -Warning: ReflectionClass::isInstance() expects parameter 1 to be object, integer given in %s on line 8 +Warning: ReflectionClass::isInstance() expects parameter 1 to be object, int given in %s on line 8 NULL Warning: ReflectionClass::isInstance() expects parameter 1 to be object, float given in %s on line 9 diff --git a/ext/reflection/tests/bug29986.phpt b/ext/reflection/tests/bug29986.phpt index f5aa62a00b..7e414504aa 100644 --- a/ext/reflection/tests/bug29986.phpt +++ b/ext/reflection/tests/bug29986.phpt @@ -23,7 +23,7 @@ Class [ <user> class just_constants ] { Constant [ public boolean BOOLEAN_CONSTANT ] { 1 } Constant [ public null NULL_CONSTANT ] { } Constant [ public string STRING_CONSTANT ] { This is a string } - Constant [ public integer INTEGER_CONSTANT ] { 1000 } + Constant [ public int INTEGER_CONSTANT ] { 1000 } Constant [ public float FLOAT_CONSTANT ] { 3.14159265 } } |