ServiceProvider::add_assets()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
dl 0
loc 3
ccs 0
cts 0
cp 0
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 1
crap 2
1
<?php
2
namespace Intraxia\Jaxion\Assets;
3
4
use Intraxia\Jaxion\Contract\Core\Container;
5
use Intraxia\Jaxion\Contract\Core\ServiceProvider as ServiceProviderContract;
6
7
/**
8
 * Class AssetsServiceProvider
9
 *
10
 * @package Intraxia\Jaxion
11
 * @subpackage Assets
12
 */
13
class ServiceProvider implements ServiceProviderContract {
14
	/**
15
	 * Container to register with.
16
	 *
17
	 * @var Container
18
	 */
19
	protected $container;
20
21
	/**
22
	 * {@inheritDoc}
23
	 *
24
	 * @param Container $container
25
	 */
26 3
	public function register( Container $container ) {
27 3
		$this->container = $container;
28
29 3
		$container->define(
30 3
			array( 'assets' => 'Intraxia\Jaxion\Contract\Assets\Register' ),
31 3
			$register = new Register( $container->fetch( 'url' ), $container->fetch( 'version' ) )
32 2
		);
33
34 3
		$this->add_assets( $register );
35 3
	}
36
37
	/**
38
	 * Registers the assets on the generated Register.
39
	 *
40
	 * This is a no-op by default by can be overwritten by the implementing developer
41
	 * to provide a single, clean location to register their assets.
42
	 *
43
	 * @param Register $register
44
	 *
45
	 * @codeCoverageIgnore
46
	 */
47
	protected function add_assets( Register $register ) {
0 ignored issues
show
Unused Code introduced by
The parameter $register is not used and could be removed.

This check looks from parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
48
		// no-op
49
	}
50
}
51