16
16
* @since $ver$
17
17
*/
18
18
final class TraceableDataSource implements MutableDataSource {
19
-
20
19
/**
21
20
* The decorated data source.
22
21
*
@@ -59,7 +58,7 @@ public function id() : string {
59
58
* @since $ver$
60
59
*/
61
60
public function get_data_by_id ( string $ id ) : array {
62
- $ this ->calls [] = [ __METHOD__ , ...func_get_args () ];
61
+ $ this ->calls [] = [ __FUNCTION__ , ...func_get_args () ];
63
62
64
63
return $ this ->inner ->get_data_by_id ( $ id );
65
64
}
@@ -69,7 +68,7 @@ public function get_data_by_id( string $id ) : array {
69
68
* @since $ver$
70
69
*/
71
70
public function get_fields () : array {
72
- $ this ->calls [] = [ __METHOD__ ];
71
+ $ this ->calls [] = [ __FUNCTION__ ];
73
72
74
73
return $ this ->inner ->get_fields ();
75
74
}
@@ -79,7 +78,7 @@ public function get_fields() : array {
79
78
* @since $ver$
80
79
*/
81
80
public function get_data_ids ( int $ limit = 20 , int $ offset = 0 ) : array {
82
- $ this ->calls [] = [ __METHOD__ , ...func_get_args () ];
81
+ $ this ->calls [] = [ __FUNCTION__ , ...func_get_args () ];
83
82
84
83
return $ this ->inner ->get_data_ids ( $ limit , $ offset );
85
84
}
@@ -89,7 +88,7 @@ public function get_data_ids( int $limit = 20, int $offset = 0 ) : array {
89
88
* @since $ver$
90
89
*/
91
90
public function filter_by ( ?Filters $ filters ) : self {
92
- $ this ->calls [] = [ __METHOD__ , ...func_get_args () ];
91
+ $ this ->calls [] = [ __FUNCTION__ , ...func_get_args () ];
93
92
94
93
$ this ->inner = $ this ->inner ->filter_by ( $ filters );
95
94
@@ -101,7 +100,7 @@ public function filter_by( ?Filters $filters ) : self {
101
100
* @since $ver$
102
101
*/
103
102
public function sort_by ( ?Sort $ sort ) : self {
104
- $ this ->calls [] = [ __METHOD__ , ...func_get_args () ];
103
+ $ this ->calls [] = [ __FUNCTION__ , ...func_get_args () ];
105
104
106
105
$ this ->inner = $ this ->inner ->sort_by ( $ sort );
107
106
@@ -113,7 +112,7 @@ public function sort_by( ?Sort $sort ) : self {
113
112
* @since $ver$
114
113
*/
115
114
public function search_by ( ?Search $ search ) : self {
116
- $ this ->calls [] = [ __METHOD__ , ...func_get_args () ];
115
+ $ this ->calls [] = [ __FUNCTION__ , ...func_get_args () ];
117
116
$ this ->inner = $ this ->inner ->search_by ( $ search );
118
117
119
118
return $ this ;
@@ -143,7 +142,7 @@ public function reset() : void {
143
142
* @since $ver$
144
143
*/
145
144
public function count () : int {
146
- $ this ->calls [] = [ __METHOD__ ];
145
+ $ this ->calls [] = [ __FUNCTION__ ];
147
146
148
147
return $ this ->inner ->count ();
149
148
}
@@ -156,7 +155,7 @@ public function can_delete() : bool {
156
155
if ( ! $ this ->inner instanceof MutableDataSource ) {
157
156
return false ;
158
157
}
159
- $ this ->calls [] = [ __METHOD__ ];
158
+ $ this ->calls [] = [ __FUNCTION__ ];
160
159
161
160
return $ this ->inner ->can_delete ();
162
161
}
@@ -170,7 +169,7 @@ public function delete_data_by_id( string ...$ids ) : void {
170
169
return ;
171
170
}
172
171
173
- $ this ->calls [] = [ __METHOD__ ];
172
+ $ this ->calls [] = [ __FUNCTION__ ];
174
173
175
174
$ this ->inner ->delete_data_by_id ( ...$ ids );
176
175
}
0 commit comments