RequestsServiceProvider::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\Requests;
11
12
use WPEmerge\ServiceProviders\ServiceProviderInterface;
13
14
/**
15
 * Provide request dependencies.
16
 *
17
 * @codeCoverageIgnore
18
 */
19
class RequestsServiceProvider implements ServiceProviderInterface {
20
	/**
21
	 * {@inheritDoc}
22
	 */
23
	public function register( $container ) {
24
		$container[ WPEMERGE_REQUEST_KEY ] = function () {
25
			return Request::fromGlobals();
26
		};
27
	}
28
29
	/**
30
	 * {@inheritDoc}
31
	 */
32
	public function bootstrap( $container ) {
33
		// Nothing to bootstrap.
34
	}
35
}
36