Completed
Push — 137-feature/construct-post-mod... ( 2fadb4...c92423 )
by Maria Daniel Deepak
03:42
created

BD_Base_Addon::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 2
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
cc 1
eloc 1
nc 1
nop 0
dl 0
loc 2
ccs 0
cts 2
cp 0
crap 2
rs 10
c 0
b 0
f 0
1
<?php
2
/**
3
 * Base class for all Base Addons.
4
 *
5
 * @since   5.5
6
 *
7
 * @author  Sudar
8
 *
9
 * @package BulkDelete\Addons\Base
10
 */
11
defined( 'ABSPATH' ) || exit; // Exit if accessed directly
12
13
/**
14
 * Base class for Base Addons.
15
 *
16
 * @abstract
17
 *
18
 * @since 5.5
19
 */
20
abstract class BD_Base_Addon extends BD_Addon {
21
	/**
22
	 * Use `factory()` method to create instance of this class.
23
	 * Don't create instances directly.
24
	 *
25
	 * @since 5.5
26
	 * @see factory()
27
	 */
28
	public function __construct() {
29
		parent::__construct();
30
	}
31
32
	/**
33
	 * Setup hooks.
34
	 * This can be overridden by the child class.
35
	 *
36
	 * @since 5.5
37
	 */
38
	protected function setup_hooks() {
39
	}
40
41
	/**
42
	 * Getter for cron hook.
43
	 *
44
	 * @since 5.5
45
	 *
46
	 * @return string Cron hook.
47
	 */
48
	public function get_cron_hook() {
49
		return $this->module->get_cron_hook();
50
	}
51
52
	/**
53
	 * Return reference to the module.
54
	 *
55
	 * @since 5.5
56
	 *
57
	 * @return Module Reference to Module Object
58
	 */
59
	public function get_module() {
60
		return $this->module;
61
	}
62
}
63