File tree 4 files changed +20
-14
lines changed
4 files changed +20
-14
lines changed Original file line number Diff line number Diff line change @@ -5,7 +5,8 @@ class ArrayIterator implements \Iterator
5
5
protected position = 0 ;
6
6
protected test;
7
7
8
- public function __construct () {
8
+ public function __construct ()
9
+ {
9
10
let this -> test = [
10
11
" one" ,
11
12
" two" ,
@@ -14,23 +15,28 @@ class ArrayIterator implements \Iterator
14
15
let this -> position = 0 ;
15
16
}
16
17
17
- public function rewind () {
18
+ public function rewind () -> void
19
+ {
18
20
let this -> position = 0 ;
19
21
}
20
22
21
- public function current () {
23
+ public function current ()
24
+ {
22
25
return this -> test[this -> position];
23
26
}
24
27
25
- public function key () {
28
+ public function key ()
29
+ {
26
30
return this -> position;
27
31
}
28
32
29
- public function next () {
33
+ public function next () -> void
34
+ {
30
35
let this -> position++ ;
31
36
}
32
37
33
- public function valid () {
38
+ public function valid ()
39
+ {
34
40
return isset this -> test[this -> position];
35
41
}
36
42
}
Original file line number Diff line number Diff line change @@ -3,8 +3,8 @@ namespace Stub;
3
3
4
4
class InternalInterfaces implements \Countable
5
5
{
6
- public function count ()
6
+ public function count () -> int
7
7
{
8
-
8
+ return 0 ;
9
9
}
10
10
}
Original file line number Diff line number Diff line change @@ -30,11 +30,11 @@ class OoNativeImplements implements
30
30
{
31
31
}
32
32
33
- public function next ()
33
+ public function next () -> void
34
34
{
35
35
}
36
36
37
- public function rewind ()
37
+ public function rewind () -> void
38
38
{
39
39
}
40
40
@@ -44,7 +44,7 @@ class OoNativeImplements implements
44
44
45
45
/* OuterIterator */
46
46
47
- public function getInnerIterator ()
47
+ public function getInnerIterator () -> <\Iterator> | null
48
48
{
49
49
}
50
50
@@ -59,7 +59,7 @@ class OoNativeImplements implements
59
59
60
60
/* SeekableIterator */
61
61
62
- public function seek ( position )
62
+ public function seek ( int position ) -> void
63
63
{
64
64
}
65
65
Original file line number Diff line number Diff line change @@ -16,9 +16,9 @@ class UseTest implements Countable
16
16
return new StandardClass ();
17
17
}
18
18
19
- public function count ()
19
+ public function count () -> int
20
20
{
21
-
21
+ return 0 ;
22
22
}
23
23
24
24
public function testUseClass1 ()
You can’t perform that action at this time.
0 commit comments