Passed
Pull Request — master (#328)
by
unknown
05:11
created

ServiceProvider::register()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 5
Bugs 0 Features 0
Metric Value
eloc 4
c 5
b 0
f 0
dl 0
loc 6
rs 10
cc 1
nc 1
nop 0
1
<?php declare(strict_types = 1);
2
3
namespace App\Services\Meta;
4
5
use WPSteak\Services\Meta\Post;
6
use WPSteak\Services\Meta\PostInterface;
7
use WPSteak\Services\Meta\Term;
8
use WPSteak\Services\Meta\TermInterface;
9
10
/**
11
 * Service provider class.
12
 *
13
 * @codeCoverageIgnore
14
 */
15
class ServiceProvider extends \League\Container\ServiceProvider\AbstractServiceProvider {
16
17
	/**
18
	 * {@inheritDoc}
19
	 */
20
	protected $provides = [
21
		PostInterface::class,
22
		TermInterface::class,
23
	];
24
25
	/**
26
	 * {@inheritDoc}
27
	 *
28
	 * @link https://github.com/thephpleague/container/issues/159
29
	 */
30
	public function register(): void {
31
		$this->getContainer()
32
			->/* @scrutinizer ignore-call */ share( PostInterface::class, Post::class );
0 ignored issues
show
introduced by
Comment after code is disallowed.
Loading history...
33
34
		$this->getContainer()
35
			->/* @scrutinizer ignore-call */ share( TermInterface::class, Term::class );
0 ignored issues
show
introduced by
Comment after code is disallowed.
Loading history...
36
	}
37
38
}
39