Skip to content

Commit fa4e488

Browse files
committed
Grammar
1 parent ee8665b commit fa4e488

9 files changed

+12
-12
lines changed

Zend/tests/type_declarations/mixed/syntax/mixed_parameter_error2.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,4 @@ function foo(?mixed $a = null)
99

1010
?>
1111
--EXPECTF--
12-
Fatal error: Type mixed can not be marked as nullable since mixed already includes null in %s on line %d
12+
Fatal error: Type mixed cannot be marked as nullable since mixed already includes null in %s on line %d

Zend/tests/type_declarations/mixed/syntax/nullable_mixed_parameter_error.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,4 @@ function foo(?mixed $a)
99

1010
?>
1111
--EXPECTF--
12-
Fatal error: Type mixed can not be marked as nullable since mixed already includes null in %s on line %d
12+
Fatal error: Type mixed cannot be marked as nullable since mixed already includes null in %s on line %d

Zend/tests/type_declarations/mixed/syntax/nullable_mixed_property_error.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,4 @@ class Foo
1010

1111
?>
1212
--EXPECTF--
13-
Fatal error: Type mixed can not be marked as nullable since mixed already includes null in %s on line %d
13+
Fatal error: Type mixed cannot be marked as nullable since mixed already includes null in %s on line %d

Zend/tests/type_declarations/mixed/syntax/nullable_mixed_return_error.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,4 @@ function foo(): ?mixed
99

1010
?>
1111
--EXPECTF--
12-
Fatal error: Type mixed can not be marked as nullable since mixed already includes null in %s on line %d
12+
Fatal error: Type mixed cannot be marked as nullable since mixed already includes null in %s on line %d

Zend/tests/type_declarations/union_types/redundant_types/nullable_null.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,4 @@ function test(): ?null {
88

99
?>
1010
--EXPECTF--
11-
Fatal error: null can not be marked as nullable in %s on line %d
11+
Fatal error: null cannot be marked as nullable in %s on line %d

Zend/tests/type_declarations/union_types/standalone_false.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,4 @@ function test(): false {}
77

88
?>
99
--EXPECTF--
10-
Fatal error: false can not be used as a standalone type in %s on line %d
10+
Fatal error: false cannot be used as a standalone type in %s on line %d

Zend/tests/type_declarations/union_types/standalone_false_implicit_nullability.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,4 @@ function test(false $v = null) {}
77

88
?>
99
--EXPECTF--
10-
Fatal error: false can not be used as a standalone type in %s on line %d
10+
Fatal error: false cannot be used as a standalone type in %s on line %d

Zend/tests/type_declarations/union_types/standalone_nullable_false.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,4 @@ function test(): ?false {}
77

88
?>
99
--EXPECTF--
10-
Fatal error: false can not be marked as nullable since false is not a standalone type in %s on line %d
10+
Fatal error: false cannot be marked as nullable since false is not a standalone type in %s on line %d

Zend/zend_compile.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6303,7 +6303,7 @@ static zend_type zend_compile_typename(
63036303
}
63046304

63056305
if (type_mask == MAY_BE_ANY && is_marked_nullable) {
6306-
zend_error_noreturn(E_COMPILE_ERROR, "Type mixed can not be marked as nullable since mixed already includes null");
6306+
zend_error_noreturn(E_COMPILE_ERROR, "Type mixed cannot be marked as nullable since mixed already includes null");
63076307
}
63086308

63096309
if ((type_mask & MAY_BE_OBJECT) && (ZEND_TYPE_IS_COMPLEX(type) || (type_mask & MAY_BE_STATIC))) {
@@ -6314,14 +6314,14 @@ static zend_type zend_compile_typename(
63146314
}
63156315

63166316
if ((type_mask & MAY_BE_NULL) && is_marked_nullable) {
6317-
zend_error_noreturn(E_COMPILE_ERROR, "null can not be marked as nullable");
6317+
zend_error_noreturn(E_COMPILE_ERROR, "null cannot be marked as nullable");
63186318
}
63196319

63206320
if ((type_mask & MAY_BE_FALSE) && !ZEND_TYPE_IS_COMPLEX(type) && !(type_mask & ~MAY_BE_FALSE)) {
63216321
if (is_marked_nullable) {
6322-
zend_error_noreturn(E_COMPILE_ERROR, "false can not be marked as nullable since false is not a standalone type");
6322+
zend_error_noreturn(E_COMPILE_ERROR, "false cannot be marked as nullable since false is not a standalone type");
63236323
} else {
6324-
zend_error_noreturn(E_COMPILE_ERROR, "false can not be used as a standalone type");
6324+
zend_error_noreturn(E_COMPILE_ERROR, "false cannot be used as a standalone type");
63256325
}
63266326
}
63276327

0 commit comments

Comments
 (0)