BD_Base_Addon   A
last analyzed

Complexity

Total Complexity 4

Size/Duplication

Total Lines 41
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

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