Code Duplication    Length = 12-13 lines in 2 locations

src/wordlift/videoobject/background-process/class-videos-data-source.php 2 locations

@@ 11-22 (lines=12) @@
8
9
	const IMPORT_DONE_FLAG = 'wl_video_object_import_complete';
10
11
	public function next() {
12
		return get_posts( array(
13
			'fields'      => 'ids',
14
			'numberposts' => - 1,
15
			'meta_query'  => array(
16
				array(
17
					'key'     => self::IMPORT_DONE_FLAG,
18
					'compare' => 'NOT EXISTS'
19
				)
20
			),
21
		) );
22
	}
23
24
	public function count() {
25
		return count( get_posts( array(
@@ 24-36 (lines=13) @@
21
		) );
22
	}
23
24
	public function count() {
25
		return count( get_posts( array(
26
			'fields'      => 'ids',
27
			'numberposts' => - 1,
28
			'meta_query'  => array(
29
				array(
30
					'key'     => self::IMPORT_DONE_FLAG,
31
					'compare' => 'NOT EXISTS'
32
				)
33
			),
34
		) ) );
35
36
	}
37
38
	public function get_batch_size() {
39
		// For now use only 5 in order to prevent exceeding api limit.