Completed
Branch master (9571d9)
by Alice
02:41
created

InstanceDefinition   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 24
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
eloc 7
dl 0
loc 24
ccs 8
cts 8
cp 1
rs 10
c 0
b 0
f 0
wmc 3

3 Methods

Rating   Name   Duplication   Size   Complexity  
A getServiceName() 0 3 1
A getInstance() 0 3 1
A __construct() 0 4 1
1
<?php
2
3
namespace Wonderland\Container\Service;
4
5
/**
6
 * Class InstanceDefinition
7
 * @package Wonderland\Container\Container\Service
8
 * @author Alice Praud <[email protected]>
9
 */
10
class InstanceDefinition implements ServiceInstanceInterface
11
{
12
	/** @var string */
13
	private $serviceName;
14
15
	/** @var mixed */
16
	private $instance;
17
18 3
	public function __construct(string $serviceName, $instance)
19
	{
20 3
		$this->serviceName = $serviceName;
21 3
		$this->instance = $instance;
22 3
	}
23
24
	/** @return string */
25 1
	public function getServiceName()
26
	{
27 1
		return $this->serviceName;
28
	}
29
30
	/** @return mixed */
31 1
	public function getInstance()
32
	{
33 1
		return $this->instance;
34
	}
35
36
}
37