-
-
Notifications
You must be signed in to change notification settings - Fork 467
/
scall.zep
162 lines (131 loc) · 2.53 KB
/
scall.zep
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
/**
* Static Function calls
*/
namespace Stub;
class Scall extends ScallParent
{
static public function testMethod1() -> string
{
return "hello public";
}
static protected function testMethod2() -> string
{
return "hello protected";
}
static private function testMethod3() -> string
{
return "hello private";
}
static public function testMethod4(var a, var b)
{
return a + b;
}
static protected function testMethod5(var a, var b)
{
return a + b;
}
static private function testMethod6(var a, var b)
{
return a + b;
}
static public function testMethod7() -> <\stdClass>
{
return new \stdClass();
}
public function testCall1()
{
return Scall::testMethod1();
}
public function testCall2()
{
return Scall::testMethod2();
}
public function testCall3()
{
return Scall::testMethod3();
}
public function testCall4(var a, var b)
{
return Scall::testMethod4(a, b);
}
public function testCall5(var a, var b)
{
return Scall::testMethod5(a, b);
}
public function testCall6(var a, var b)
{
return Scall::testMethod6(a, b);
}
public function testCall7()
{
return self::testMethod1();
}
public function testCall8()
{
return self::testMethod2();
}
public function testCall9()
{
return self::testMethod3();
}
public function testCall10(var a, var b)
{
return self::testMethod4(a, b);
}
public function testCall11(var a, var b)
{
return self::testMethod5(a, b);
}
public function testCall12(var a, var b)
{
return self::testMethod6(a, b);
}
public function testCall13()
{
return parent::testMethod1();
}
public function testCall14()
{
return parent::testMethod2();
}
public function testCall15()
{
return self::testMethod7();
}
public static function testMethod16(long a, long b) -> long
{
return a + b;
}
public static function testCall17(long k, var p)
{
long i, j = 0;
for i in range(1, k) {
let j += \Stub\ScallExternal::testMethod3(p, p);
}
return j;
}
public static function testCall18(long k, var p)
{
long i, j = 0;
for i in range(1, k) {
let j += self::testMethod16(p, p);
}
return j;
}
static protected function testMethodStatic() -> string
{
return "hello Scall";
}
public function interpolatedStaticReturn() -> string
{
string className = "Stub\\Scall";
string methodName = "testMethodStatic";
return {className}::{methodName}();
}
public function interpolatedStaticEcho() -> void
{
string className = "Stub\\Scall";
string methodName = "testMethodStatic";
echo {className}::{methodName}();
}
}