Skip to content

Commit b4c3783

Browse files
committed
Address review
1 parent fa4e488 commit b4c3783

File tree

4 files changed

+30
-2
lines changed

4 files changed

+30
-2
lines changed

Zend/tests/type_declarations/typed_properties_110.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ Test typed properties allow null
33
--FILE--
44
<?php
55
class Foo {
6-
public null $int;
6+
public null $value;
77
}
88

99
$foo = new Foo();
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
--TEST--
2+
Typed null|false return without value generates compile-time error
3+
--FILE--
4+
<?php
5+
6+
function test() : null|false {
7+
return;
8+
}
9+
10+
test();
11+
12+
?>
13+
--EXPECTF--
14+
Fatal error: A function with return type must return a value (did you mean "return null;" instead of "return;"?) in %s on line %d
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
--TEST--
2+
Typed null return without value generates compile-time error
3+
--FILE--
4+
<?php
5+
6+
function test() : null {
7+
return;
8+
}
9+
10+
test();
11+
12+
?>
13+
--EXPECTF--
14+
Fatal error: A function with return type must return a value (did you mean "return null;" instead of "return;"?) in %s on line %d

Zend/tests/type_declarations/union_types/null_false_union.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
--TEST--
2-
Null and false cann be used in a union type
2+
Null and false can be used in a union type
33
--FILE--
44
<?php
55

0 commit comments

Comments
 (0)