1
1
<?php
2
2
3
3
namespace {
4
+ if (extension_loaded('excimer')) {
5
+ return;
6
+ }
4
7
5
8
/**
6
9
* A collected series of stack traces and some utility methods to aggregate them.
@@ -22,9 +25,9 @@ namespace {
22
25
* are available via:
23
26
* - ExcimerProfiler::getLog()
24
27
* - ExcimerProfiler::flush()
25
- * - The callback to ExcimerProfiler::setFlushCallback()
28
+ * - The callback to ExcimerProfiler::setFlushCallback().
26
29
*/
27
- private final function __construct()
30
+ final private function __construct()
28
31
{
29
32
}
30
33
@@ -38,7 +41,7 @@ namespace {
38
41
*
39
42
* @return string
40
43
*/
41
- function formatCollapsed()
44
+ public function formatCollapsed()
42
45
{
43
46
}
44
47
@@ -69,16 +72,16 @@ namespace {
69
72
*
70
73
* @return array
71
74
*/
72
- function aggregateByFunction()
75
+ public function aggregateByFunction()
73
76
{
74
77
}
75
78
76
79
/**
77
- * Get an array which can be JSON encoded for import into speedscope
80
+ * Get an array which can be JSON encoded for import into speedscope.
78
81
*
79
82
* @return array
80
83
*/
81
- function getSpeedscopeData()
84
+ public function getSpeedscopeData()
82
85
{
83
86
}
84
87
@@ -87,7 +90,7 @@ namespace {
87
90
*
88
91
* @return int
89
92
*/
90
- function getEventCount()
93
+ public function getEventCount()
91
94
{
92
95
}
93
96
@@ -96,8 +99,8 @@ namespace {
96
99
*
97
100
* @return ExcimerLogEntry
98
101
*/
99
- #[\ ReturnTypeWillChange]
100
- function current()
102
+ #[ReturnTypeWillChange]
103
+ public function current()
101
104
{
102
105
}
103
106
@@ -106,8 +109,8 @@ namespace {
106
109
*
107
110
* @return int
108
111
*/
109
- #[\ ReturnTypeWillChange]
110
- function key()
112
+ #[ReturnTypeWillChange]
113
+ public function key()
111
114
{
112
115
}
113
116
@@ -116,8 +119,8 @@ namespace {
116
119
*
117
120
* @return void
118
121
*/
119
- #[\ ReturnTypeWillChange]
120
- function next()
122
+ #[ReturnTypeWillChange]
123
+ public function next()
121
124
{
122
125
}
123
126
@@ -126,8 +129,8 @@ namespace {
126
129
*
127
130
* @return void
128
131
*/
129
- #[\ ReturnTypeWillChange]
130
- function rewind()
132
+ #[ReturnTypeWillChange]
133
+ public function rewind()
131
134
{
132
135
}
133
136
@@ -136,8 +139,8 @@ namespace {
136
139
*
137
140
* @return bool
138
141
*/
139
- #[\ ReturnTypeWillChange]
140
- function valid()
142
+ #[ReturnTypeWillChange]
143
+ public function valid()
141
144
{
142
145
}
143
146
@@ -148,7 +151,7 @@ namespace {
148
151
*
149
152
* @return int
150
153
*/
151
- function count()
154
+ public function count()
152
155
{
153
156
}
154
157
@@ -157,33 +160,35 @@ namespace {
157
160
* Part of the ArrayAccess interface.
158
161
*
159
162
* @param int $offset
163
+ *
160
164
* @return bool
161
165
*/
162
- #[\ ReturnTypeWillChange]
163
- function offsetExists($offset)
166
+ #[ReturnTypeWillChange]
167
+ public function offsetExists($offset)
164
168
{
165
169
}
166
170
167
171
/**
168
172
* Get the ExcimerLogEntry object at the specified array offset.
169
173
*
170
174
* @param int $offset
175
+ *
171
176
* @return ExcimerLogEntry
172
177
*/
173
- #[\ ReturnTypeWillChange]
174
- function offsetGet($offset)
178
+ #[ReturnTypeWillChange]
179
+ public function offsetGet($offset)
175
180
{
176
181
}
177
182
178
183
/**
179
184
* This function is included for compliance with the ArrayAccess interface.
180
185
* It raises a warning and does nothing.
181
186
*
182
- * @param int|null $offset
187
+ * @param int|null $offset
183
188
* @param ExcimerLogEntry $value
184
189
*/
185
- #[\ ReturnTypeWillChange]
186
- function offsetSet($offset, $value)
190
+ #[ReturnTypeWillChange]
191
+ public function offsetSet($offset, $value)
187
192
{
188
193
}
189
194
@@ -193,8 +198,8 @@ namespace {
193
198
*
194
199
* @param int $offset
195
200
*/
196
- #[\ ReturnTypeWillChange]
197
- function offsetUnset($offset)
201
+ #[ReturnTypeWillChange]
202
+ public function offsetUnset($offset)
198
203
{
199
204
}
200
205
}
0 commit comments