Profile   A
last analyzed

Complexity

Total Complexity 8

Size/Duplication

Total Lines 98
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 8
lcom 0
cbo 0
dl 0
loc 98
rs 10
c 0
b 0
f 0
ccs 15
cts 15
cp 1

8 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 8 1
A setEnabled() 0 4 1
A isEnabled() 0 4 1
A getName() 0 4 1
A getCountries() 0 4 1
A getLanguages() 0 4 1
A getCurrencies() 0 4 1
A getDomains() 0 4 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace SixtyEightPublishers\Application\Environment;
6
7
/**
8
 * @internal
9
 */
10 1
class Profile implements IProfile
11
{
12
	/** @var string  */
13
	private $name;
14
15
	/** @var array  */
16
	private $countries;
17
18
	/** @var array  */
19
	private $languages;
20
21
	/** @var array  */
22
	private $currencies;
23
24
	/** @var array  */
25
	private $domains;
26
27
	/** @var bool  */
28
	private $enabled = TRUE;
29
30
	/**
31
	 * @param string        $name
32
	 * @param array         $countries
33
	 * @param array         $languages
34
	 * @param array         $currencies
35
	 * @param array         $domains
36
	 */
37
	public function __construct($name, array $countries, array $languages, array $currencies, array $domains)
38
	{
39 1
		$this->name = $name;
40 1
		$this->countries = $countries;
41 1
		$this->languages = $languages;
42 1
		$this->currencies = $currencies;
43 1
		$this->domains = $domains;
44 1
	}
45
46
	/**
47
	 * @param bool $enabled
48
	 *
49
	 * @return void
50
	 */
51
	public function setEnabled($enabled = TRUE)
52
	{
53 1
		$this->enabled = $enabled;
54 1
	}
55
56
	/**
57
	 * @return bool
58
	 */
59
	public function isEnabled()
60
	{
61 1
		return $this->enabled;
62
	}
63
64
65
	/***************** interface \SixtyEightPublishers\Application\Environment\IProfile *****************/
66
67
68
	/**
69
	 * @return string
70
	 */
71
	public function getName() : string
72
	{
73 1
		return $this->name;
74
	}
75
76
	/**
77
	 * @return array
78
	 */
79
	public function getCountries() : array
80
	{
81 1
		return $this->countries;
82
	}
83
84
	/**
85
	 * @return array
86
	 */
87
	public function getLanguages() : array
88
	{
89 1
		return $this->languages;
90
	}
91
92
	/**
93
	 * @return array
94
	 */
95
	public function getCurrencies() : array
96
	{
97 1
		return $this->currencies;
98
	}
99
100
	/**
101
	 * @return array
102
	 */
103
	public function getDomains() : array
104
	{
105 1
		return $this->domains;
106
	}
107
}
108