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

ServiceDefinition   A

Complexity

Total Complexity 5

Size/Duplication

Total Lines 58
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
eloc 13
dl 0
loc 58
ccs 14
cts 14
cp 1
rs 10
c 0
b 0
f 0
wmc 5

5 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 6 1
A getServiceName() 0 3 1
A getClass() 0 3 1
A getCalls() 0 3 1
A getConstructArgs() 0 3 1
1
<?php
2
3
namespace Wonderland\Container\Service;
4
5
/**
6
 * Class Definition
7
 * @package Wonderland\Container\Container\Service
8
 * @author Alice Praud <[email protected]>
9
 */
10
class ServiceDefinition implements ServiceDefinitionInterface
11
{
12
	/** @var string */
13
	private $serviceName;
14
15
	/** @var string */
16
	private $class;
17
18
	/** @var array */
19
	private $constructArgs;
20
21
	/** @var array */
22
	private $calls;
23
24
	/**
25
	 * RepositoryFactory constructor.
26
	 *
27
	 * @param string $serviceName
28
	 * @param string $class
29
	 * @param array $args
30
	 * @param array $calls
31
	 */
32 5
	public function __construct(string $serviceName, string $class, array $args = [], array $calls = [])
33
	{
34 5
		$this->serviceName = $serviceName;
35 5
		$this->class = $class;
36 5
		$this->constructArgs = $args;
37 5
		$this->calls = $calls;
38 5
	}
39
40
	/**
41
	 * @return string
42
	 */
43 1
	public function getClass()
44
	{
45 1
		return $this->class;
46
	}
47
48
	/** @return string */
49 5
	public function getServiceName()
50
	{
51 5
		return $this->serviceName;
52
	}
53
54
	/**
55
	 * @return array
56
	 */
57 1
	public function getConstructArgs()
58
	{
59 1
		return $this->constructArgs;
60
	}
61
62
	/**
63
	 * @return array
64
	 */
65 1
	public function getCalls()
66
	{
67 1
		return $this->calls;
68
	}
69
70
}
71