Skip to content

Commit e10139e

Browse files
committed
chore: relocate AbstractConnectionResolver::is_valid_offset() with other abstract methods
1 parent cb18964 commit e10139e

File tree

1 file changed

+11
-13
lines changed

1 file changed

+11
-13
lines changed

src/Data/Connection/AbstractConnectionResolver.php

Lines changed: 11 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -260,6 +260,17 @@ abstract public function get_query_args();
260260
*/
261261
abstract public function get_query();
262262

263+
/**
264+
* Determine whether or not the the offset is valid, i.e the item corresponding to the offset exists.
265+
*
266+
* Offset is equivalent to WordPress ID (e.g post_id, term_id). So this is equivalent to checking if the WordPress object exists for the given ID.
267+
*
268+
* @param mixed $offset The offset to validate. Typically a WordPress Database ID
269+
*
270+
* @return bool
271+
*/
272+
abstract public function is_valid_offset( $offset );
273+
263274
/**
264275
* Used to determine whether the connection query should be executed. This is useful for short-circuiting the connection resolver before executing the query.
265276
*
@@ -294,19 +305,6 @@ protected function max_query_amount(): int {
294305
return 100;
295306
}
296307

297-
/**
298-
* Is_valid_offset
299-
*
300-
* Determine whether or not the the offset is valid, i.e the item corresponding to the offset
301-
* exists. Offset is equivalent to WordPress ID (e.g post_id, term_id). So this function is
302-
* equivalent to checking if the WordPress object exists for the given ID.
303-
*
304-
* @param mixed $offset The offset to validate. Typically a WordPress Database ID
305-
*
306-
* @return bool
307-
*/
308-
abstract public function is_valid_offset( $offset );
309-
310308
/**
311309
* Return an array of ids from the query
312310
*

0 commit comments

Comments
 (0)