Hookable_Module   A
last analyzed

Complexity

Total Complexity 4

Size/Duplication

Total Lines 43
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 2
c 1
b 0
f 0
dl 0
loc 43
rs 10
wmc 4

4 Methods

Rating   Name   Duplication   Size   Complexity  
A post_register() 0 1 1
A pre_boot() 0 1 1
A pre_register() 0 1 1
A get_middleware() 0 2 1
1
<?php
2
3
declare(strict_types=1);
4
5
/**
6
 * The Hookable Module.
7
 *
8
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
9
 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
10
 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
11
 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
12
 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
13
 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
14
 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
15
 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
16
 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
17
 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
18
 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
19
 *
20
 * @author Glynn Quelch <[email protected]>
21
 * @license http://www.opensource.org/licenses/mit-license.html  MIT License
22
 * @package PinkCrab\Perique\Registration
23
 * @since 2.0.0
24
 */
25
26
namespace PinkCrab\Perique\Services\Registration\Modules;
27
28
use PinkCrab\Loader\Hook_Loader;
29
use PinkCrab\Perique\Interfaces\Module;
30
use PinkCrab\Perique\Application\App_Config;
31
use PinkCrab\Perique\Interfaces\DI_Container;
32
use PinkCrab\Perique\Interfaces\Registration_Middleware;
33
use PinkCrab\Perique\Services\Registration\Modules\Hookable_Middleware;
34
35
class Hookable_Module implements Module {
36
37
	/**
38
	 * Get the middleware for the module.
39
	 *
40
	 * @return class-string<Registration_Middleware>|null
0 ignored issues
show
Documentation Bug introduced by
The doc comment class-string<Registration_Middleware>|null at position 0 could not be parsed: Unknown type name 'class-string' at position 0 in class-string<Registration_Middleware>|null.
Loading history...
41
	 */
42
	public function get_middleware(): ?string {
43
		return Hookable_Middleware::class;
44
	}
45
46
	/**
47
	 * Callback fired before the Application is booted.
48
	 *
49
	 * @pram App_Config $config
50
	 * @pram Hook_Loader $loader
51
	 * @pram DI_Container $di_container
52
	 * @return void
53
	 */
54
	public function pre_boot( App_Config $config, Hook_Loader $loader, DI_Container $di_container ): void {
55
	}
56
57
58
	/**
59
	 * Callback fired before registration is started.
60
	 *
61
	 * @pram App_Config $config
62
	 * @pram Hook_Loader $loader
63
	 * @pram DI_Container $di_container
64
	 * @return void
65
	 */
66
	public function pre_register( App_Config $config, Hook_Loader $loader, DI_Container $di_container ): void {
67
	}
68
69
	/**
70
	 * Callback fired after registration is completed.
71
	 *
72
	 * @pram App_Config $config
73
	 * @pram Hook_Loader $loader
74
	 * @pram DI_Container $di_container
75
	 * @return void
76
	 */
77
	public function post_register( App_Config $config, Hook_Loader $loader, DI_Container $di_container ): void {
78
	}
79
}
80