Completed
Push — master ( a91c7b...483fcf )
by Alice
18:08
created

ServiceDefinition   A

Complexity

Total Complexity 5

Size/Duplication

Total Lines 58
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 13
dl 0
loc 58
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
	public function __construct(string $serviceName, string $class, array $args = [], array $calls = [])
33
	{
34
		$this->serviceName = $serviceName;
35
		$this->class = $class;
36
		$this->constructArgs = $args;
37
		$this->calls = $calls;
38
	}
39
40
	/**
41
	 * @return string
42
	 */
43
	public function getClass()
44
	{
45
		return $this->class;
46
	}
47
48
	/** @return string */
49
	public function getServiceName()
50
	{
51
		return $this->serviceName;
52
	}
53
54
	/**
55
	 * @return array
56
	 */
57
	public function getConstructArgs()
58
	{
59
		return $this->constructArgs;
60
	}
61
62
	/**
63
	 * @return array
64
	 */
65
	public function getCalls()
66
	{
67
		return $this->calls;
68
	}
69
70
}
71