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

InstanceDefinition::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 3
CRAP Score 1

Importance

Changes 0
Metric Value
cc 1
eloc 2
nc 1
nop 2
dl 0
loc 4
ccs 3
cts 3
cp 1
crap 1
rs 10
c 0
b 0
f 0
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