summaryrefslogtreecommitdiff
path: root/Zend/tests/type_declarations/scalar_return_basic.phpt
diff options
context:
space:
mode:
authorGabriel Caruso <carusogabriel34@gmail.com>2018-02-04 16:42:36 -0200
committerNikita Popov <nikita.ppv@gmail.com>2018-02-04 23:09:40 +0100
commitfef879a2d63899ed25f39b4581c16682afdd0a8f (patch)
treece12aa17bbd2db3d0cfd2cabda46e4bcdb074686 /Zend/tests/type_declarations/scalar_return_basic.phpt
parentce1d69a1f6dcf15d43029301059c25e5bc09a577 (diff)
downloadphp-git-fef879a2d63899ed25f39b4581c16682afdd0a8f.tar.gz
Use bool instead of boolean while throwing a type error
PHP requires boolean typehints to be written "bool" and disallows "boolean" as an alias. This changes the error messages to match the actual type name and avoids confusing messages like "must be of type boolean, boolean given". This a followup to ce1d69a1f6dcf15d43029301059c25e5bc09a577, which implements the same change for integer->int.
Diffstat (limited to 'Zend/tests/type_declarations/scalar_return_basic.phpt')
-rw-r--r--Zend/tests/type_declarations/scalar_return_basic.phpt10
1 files changed, 5 insertions, 5 deletions
diff --git a/Zend/tests/type_declarations/scalar_return_basic.phpt b/Zend/tests/type_declarations/scalar_return_basic.phpt
index cf58f91500..dd7a3daf85 100644
--- a/Zend/tests/type_declarations/scalar_return_basic.phpt
+++ b/Zend/tests/type_declarations/scalar_return_basic.phpt
@@ -200,17 +200,17 @@ bool(true)
*** Trying bool(false)
bool(false)
*** Trying NULL
-*** Caught Return value of {closure}() must be of the type boolean, null returned in %s on line %d
+*** Caught Return value of {closure}() must be of the type bool, null returned in %s on line %d
*** Trying array(0) {
}
-*** Caught Return value of {closure}() must be of the type boolean, array returned in %s on line %d
+*** Caught Return value of {closure}() must be of the type bool, array returned in %s on line %d
*** Trying object(stdClass)#6 (0) {
}
-*** Caught Return value of {closure}() must be of the type boolean, object returned in %s on line %d
+*** Caught Return value of {closure}() must be of the type bool, object returned in %s on line %d
*** Trying object(Stringable)#7 (0) {
}
-*** Caught Return value of {closure}() must be of the type boolean, object returned in %s on line %d
+*** Caught Return value of {closure}() must be of the type bool, object returned in %s on line %d
*** Trying resource(5) of type (stream)
-*** Caught Return value of {closure}() must be of the type boolean, resource returned in %s on line %d
+*** Caught Return value of {closure}() must be of the type bool, resource returned in %s on line %d
Done