Completed
Push — master ( 9f3eac...f0c1b5 )
by David
02:49 queued 13s
created

Reload_Data_Task::get_label()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
nc 1
nop 0
dl 0
loc 4
rs 10
c 0
b 0
f 0
1
<?php
2
3
namespace Wordlift\Images_Licenses\Tasks;
4
5
use Wordlift\Images_Licenses\Image_License_Scheduler;
6
use Wordlift\Tasks\Task;
7
8
class Reload_Data_Task implements Task {
9
10
	/**
11
	 * @inheritDoc
12
	 */
13
	function get_id() {
0 ignored issues
show
Best Practice introduced by
It is generally recommended to explicitly declare the visibility for methods.

Adding explicit visibility (private, protected, or public) is generally recommend to communicate to other developers how, and from where this method is intended to be used.

Loading history...
14
15
		return 'wl_reload_data_task';
16
	}
17
18
	function get_label() {
0 ignored issues
show
Best Practice introduced by
It is generally recommended to explicitly declare the visibility for methods.

Adding explicit visibility (private, protected, or public) is generally recommend to communicate to other developers how, and from where this method is intended to be used.

Loading history...
19
20
		return __( 'Reload data', 'wordlift' );
21
	}
22
23
	/**
24
	 * @inheritDoc
25
	 */
26
	function list_items( $limit = 10, $offset = 0 ) {
0 ignored issues
show
Best Practice introduced by
It is generally recommended to explicitly declare the visibility for methods.

Adding explicit visibility (private, protected, or public) is generally recommend to communicate to other developers how, and from where this method is intended to be used.

Loading history...
27
28
		return array( 1 );
29
	}
30
31
	/**
32
	 * @inheritDoc
33
	 */
34
	function count_items() {
0 ignored issues
show
Best Practice introduced by
It is generally recommended to explicitly declare the visibility for methods.

Adding explicit visibility (private, protected, or public) is generally recommend to communicate to other developers how, and from where this method is intended to be used.

Loading history...
35
36
		return 1;
37
	}
38
39
	/**
40
	 * @inheritDoc
41
	 */
42
	function process_item( $item ) {
0 ignored issues
show
Best Practice introduced by
It is generally recommended to explicitly declare the visibility for methods.

Adding explicit visibility (private, protected, or public) is generally recommend to communicate to other developers how, and from where this method is intended to be used.

Loading history...
43
44
		do_action( Image_License_Scheduler::ACTION_NAME );
45
46
	}
47
48
}
49