Passed
Push — master ( 379f19...9ce0c5 )
by
unknown
06:34
created

OldInputServiceProvider   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 23
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Importance

Changes 0
Metric Value
wmc 2
lcom 0
cbo 2
dl 0
loc 23
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A register() 0 11 1
A boot() 0 3 1
1
<?php
2
3
namespace CarbonFramework\Input;
4
5
use CarbonFramework\Framework;
6
use CarbonFramework\ServiceProviders\ServiceProviderInterface;
7
8
/**
9
 * Provide old input dependencies
10
 *
11
 * @codeCoverageIgnore
12
 */
13
class OldInputServiceProvider implements ServiceProviderInterface {
14
	/**
15
	 * {@inheritDoc}
16
	 */
17
	public function register( $container ) {
18
		$container['framework.routing.global_middleware'] = array_merge( $container['framework.routing.global_middleware'], [
19
			\CarbonFramework\Input\OldInputMiddleware::class,
20
		] );
21
22
		$container['framework.old_input.old_input'] = function() {
23
			return new \CarbonFramework\Input\OldInput();
24
		};
25
26
		Framework::facade( 'OldInput', \CarbonFramework\Input\OldInputFacade::class );
27
	}
28
29
	/**
30
	 * {@inheritDoc}
31
	 */
32
	public function boot( $container ) {
33
		// nothing to boot
34
	}
35
}
36