ServiceProvider   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 19
Duplicated Lines 0 %

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A register() 0 6 1
1
<?php declare(strict_types = 1);
0 ignored issues
show
introduced by
Expected 1 line before declare statement, found 0.
Loading history...
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
	public function register(): void {
29
		$this->getLeagueContainer()
30
			->share( PostInterface::class, Post::class );
31
32
		$this->getLeagueContainer()
33
			->share( TermInterface::class, Term::class );
34
	}
35
36
}
37