Failed Conditions
Push — develop ( d7a728...605806 )
by Elvis Henrique
04:12
created

ServiceProvider   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 20
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
wmc 1
eloc 6
dl 0
loc 20
c 0
b 0
f 0
ccs 0
cts 3
cp 0
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A register() 0 3 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
/**
13
 * Service provider class.
14
 */
15
class ServiceProvider extends \League\Container\ServiceProvider\AbstractServiceProvider {
16
17
	/**
18
	 * Provides.
19
	 *
20
	 * @var string[]
21
	 */
22
	protected $provides = [
23
		PostInterface::class,
24
		TermInterface::class,
25
	];
26
27
	/**
28
	 * Register.
29
	 *
30
	 * @return void
31
	 */
32
	public function register() {
33
		$this->getContainer()->share( PostInterface::class, Post::class );
0 ignored issues
show
Bug introduced by
The method share() does not exist on Psr\Container\ContainerInterface. It seems like you code against a sub-type of Psr\Container\ContainerInterface such as League\Container\Container. ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-call  annotation

33
		$this->getContainer()->/** @scrutinizer ignore-call */ share( PostInterface::class, Post::class );
Loading history...
34
		$this->getContainer()->share( TermInterface::class, Term::class );
35
	}
36
}
37