Passed
Push — 218-fix/metabox-for-delete-pos... ( 76f661...4c1c9d )
by
unknown
06:21
created

BD_Base_Addon   A

Complexity

Total Complexity 4

Size/Duplication

Total Lines 41
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

Changes 4
Bugs 2 Features 0
Metric Value
c 4
b 2
f 0
dl 0
loc 41
ccs 0
cts 9
cp 0
rs 10
wmc 4

4 Methods

Rating   Name   Duplication   Size   Complexity  
A get_cron_hook() 0 2 1
A get_module() 0 2 1
A setup_hooks() 0 1 1
A __construct() 0 2 1
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
0 ignored issues
show
Bug introduced by
The type Module was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
58
	 */
59
	public function get_module() {
60
		return $this->module;
61
	}
62
}
63