File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed
src/test/php/lang/ast/unittest/emit Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change 1
1
<?php namespace lang \ast \unittest \emit ;
2
2
3
- use lang \IllegalArgumentException ;
3
+ use lang \{ IllegalArgumentException , Value } ;
4
4
5
5
/** Used by `UsingTest` */
6
- class Handle implements \IDisposable {
6
+ class Handle implements Value, \IDisposable {
7
7
public static $ DEFAULT ;
8
8
public static $ called = [];
9
9
private $ id ;
@@ -28,6 +28,12 @@ public function read($bytes= 8192) {
28
28
return 'test ' ;
29
29
}
30
30
31
+ public function toString () { return nameof ($ this ).'< ' .$ this ->id .'> ' ; }
32
+
33
+ public function hashCode () { return '# ' .$ this ->id ; }
34
+
35
+ public function compareTo ($ value ) { return $ value instanceof self ? $ value ->id <=> $ this ->id : 1 ; }
36
+
31
37
public function __dispose () {
32
38
self ::$ called []= '__dispose@ ' .$ this ->id ;
33
39
}
You can’t perform that action at this time.
0 commit comments