ControllersServiceProvider::bootstrap()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 1
Code Lines 0

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
eloc 0
nc 1
nop 1
dl 0
loc 1
c 0
b 0
f 0
cc 1
rs 10
1
<?php
2
/**
3
 * @package   WPEmerge
4
 * @author    Atanas Angelov <[email protected]>
5
 * @copyright 2017-2019 Atanas Angelov
6
 * @license   https://www.gnu.org/licenses/gpl-2.0.html GPL-2.0
7
 * @link      https://wpemerge.com/
8
 */
9
10
namespace WPEmerge\Controllers;
11
12
use WPEmerge;
13
use WPEmerge\ServiceProviders\ServiceProviderInterface;
14
15
/**
16
 * Provide controller dependencies
17
 *
18
 * @codeCoverageIgnore
19
 */
20
class ControllersServiceProvider implements ServiceProviderInterface {
21
	/**
22
	 * {@inheritDoc}
23
	 */
24
	public function register( $container ) {
25
		$container[ WordPressController::class ] = function ( $c ) {
26
			return new WordPressController( $c[ WPEMERGE_VIEW_SERVICE_KEY ] );
27
		};
28
	}
29
30
	/**
31
	 * {@inheritDoc}
32
	 */
33
	public function bootstrap( $container ) {
34
		// Nothing to bootstrap.
35
	}
36
}
37