Test Failed
Push — master ( b6268a...3d95f3 )
by Stiofan
59s queued 10s
created

GeoDir_Privacy_Background_Process   A

Complexity

Total Complexity 4

Size/Duplication

Total Lines 26
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 0
Metric Value
dl 0
loc 26
rs 10
c 0
b 0
f 0
wmc 4
lcom 0
cbo 1

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 6 1
A task() 0 7 3
1
<?php
2
/**
3
 * GeoDirectory data cleanup background process.
4
 *
5
 * @package GeoDirectory
6
 * @since   1.2.26
7
 */
8
9
defined( 'ABSPATH' ) || exit;
10
11
if ( ! class_exists( 'GeoDir_Background_Process', false ) ) {
12
	include_once( 'class-geodir-background-process.php' );
13
}
14
15
/**
16
 * GeoDir_Privacy_Background_Process class.
17
 */
18
class GeoDir_Privacy_Background_Process extends GeoDir_Background_Process {
19
20
	/**
21
	 * Initiate new background process.
22
	 */
23
	public function __construct() {
24
		// Uses unique prefix per blog so each blog has separate queue.
25
		$this->prefix = 'wp_' . get_current_blog_id();
26
		$this->action = 'geodir_privacy_cleanup';
27
		parent::__construct();
28
	}
29
30
	/**
31
	 * Code to execute for each item in the queue
32
	 *
33
	 * @param string $item Queue item to iterate over.
34
	 * @return bool
35
	 */
36
	protected function task( $item ) {
37
		if ( ! $item || empty( $item['task'] ) ) {
38
			return false;
39
		}
40
41
		return false;
42
	}
43
}
44