Total Complexity | 5 |
Total Lines | 24 |
Duplicated Lines | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 1 |
1 | <?php |
||
24 | class Ajax implements Module { |
||
25 | |||
26 | public function __construct( DI_Container $di_container ) { |
||
27 | $di_container->addRule( |
||
28 | '*', |
||
29 | array( |
||
30 | 'substitutions' => array( |
||
31 | ServerRequestInterface::class => array( |
||
32 | \Dice\Dice::INSTANCE => fn() => HTTP_Helper::global_server_request(), |
||
33 | ), |
||
34 | ), |
||
35 | ) |
||
36 | ); |
||
37 | } |
||
38 | |||
39 | /** @inheritDoc */ |
||
40 | public function get_middleware(): ?string { |
||
41 | return Ajax_Middleware::class; |
||
42 | } |
||
43 | |||
44 | ## Unused methods |
||
45 | public function pre_register( App_Config $config, Hook_Loader $loader, DI_Container $di_container ): void {} // phpcs:ignore Generic.CodeAnalysis.UnusedFunctionParameter.FoundInImplementedInterfaceBeforeLastUsed |
||
46 | public function pre_boot( App_Config $config, Hook_Loader $loader, DI_Container $di_container ): void {} // phpcs:ignore Generic.CodeAnalysis.UnusedFunctionParameter.FoundInImplementedInterfaceBeforeLastUsed |
||
47 | public function post_register( App_Config $config, Hook_Loader $loader, DI_Container $di_container ): void {} // phpcs:ignore Generic.CodeAnalysis.UnusedFunctionParameter.FoundInImplementedInterfaceBeforeLastUsed |
||
48 | } |
||
49 |