File tree 3 files changed +11
-8
lines changed
3 files changed +11
-8
lines changed Original file line number Diff line number Diff line change 5
5
namespace test \ns1 ;
6
6
7
7
class Foo implements \SplObserver {
8
- function update (\SplSubject $ x ) {
8
+ function update (\SplSubject $ x ): void {
9
9
echo "ok \n" ;
10
10
}
11
11
}
12
12
13
13
class Bar implements \SplSubject {
14
- function attach (\SplObserver $ x ) {
14
+ function attach (\SplObserver $ x ): void {
15
15
echo "ok \n" ;
16
16
}
17
- function notify () {
17
+ function notify (): void {
18
18
}
19
- function detach (\SplObserver $ x ) {
19
+ function detach (\SplObserver $ x ): void {
20
20
}
21
21
}
22
22
$ foo = new Foo ();
Original file line number Diff line number Diff line change @@ -6,18 +6,18 @@ namespace test\ns1;
6
6
use \SplObserver ;
7
7
8
8
class Foo implements SplObserver {
9
- function update (\SplSubject $ x ) {
9
+ function update (\SplSubject $ x ): void {
10
10
echo "ok \n" ;
11
11
}
12
12
}
13
13
14
14
class Bar implements \SplSubject {
15
- function attach (SplObserver $ x ) {
15
+ function attach (SplObserver $ x ): void {
16
16
echo "ok \n" ;
17
17
}
18
- function notify () {
18
+ function notify (): void {
19
19
}
20
- function detach (SplObserver $ x ) {
20
+ function detach (SplObserver $ x ): void {
21
21
}
22
22
}
23
23
$ foo = new Foo ();
Original file line number Diff line number Diff line change @@ -180,7 +180,10 @@ string(4) "Test"
180
180
181
181
*** return types
182
182
** Function/method return type 0
183
+ bool(true)
183
184
bool(false)
185
+ bool(true)
186
+ string(4) "void"
184
187
** Function/method return type 1
185
188
bool(true)
186
189
bool(false)
You can’t perform that action at this time.
0 commit comments