Failed Conditions
Push — develop ( 468b4b...eef6cb )
by Elvis Henrique
03:42
created

ServiceProvider   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 24
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 1
eloc 8
dl 0
loc 24
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A register() 0 6 1
1
<?php
2
/**
3
 * Service provider.
4
 *
5
 * @package App
6
 */
7
8
declare(strict_types=1);
9
10
namespace App\Services\Meta;
11
12
use WPSteak\Services\Meta\Post;
13
use WPSteak\Services\Meta\PostInterface;
14
use WPSteak\Services\Meta\Term;
15
use WPSteak\Services\Meta\TermInterface;
16
17
/**
18
 * Service provider class.
19
 *
20
 * @codeCoverageIgnore
21
 */
22
class ServiceProvider extends \League\Container\ServiceProvider\AbstractServiceProvider {
23
24
	/**
25
	 * Provides.
26
	 *
27
	 * @var string[]
28
	 */
29
	protected $provides = [
30
		PostInterface::class,
31
		TermInterface::class,
32
	];
33
34
	/**
35
	 * Register.
36
	 *
37
	 * @link https://github.com/thephpleague/container/issues/159
38
	 * @return void
39
	 */
40
	public function register() {
41
		$this->getContainer()
42
			->/* @scrutinizer ignore-call */ share( PostInterface::class, Post::class );
43
44
		$this->getContainer()
45
			->/* @scrutinizer ignore-call */ share( TermInterface::class, Term::class );
46
	}
47
}
48