Profile::__construct()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 8
Code Lines 6

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 6
c 1
b 0
f 0
nc 1
nop 6
dl 0
loc 8
rs 10
1
<?php
2
3
declare(strict_types=1);
4
5
namespace SixtyEightPublishers\i18n\Profile;
6
7
use Nette\SmartObject;
8
9
final class Profile implements ProfileInterface
10
{
11
	use SmartObject;
12
13
	/** @var string  */
14
	private $name;
15
16
	/** @var array  */
17
	private $languages;
18
19
	/** @var array  */
20
	private $countries;
21
22
	/** @var array  */
23
	private $currencies;
24
25
	/** @var array  */
26
	private $domains;
27
28
	/** @var bool  */
29
	private $enabled;
30
31
	/**
32
	 * @param string   $name
33
	 * @param string[] $languages
34
	 * @param string[] $countries
35
	 * @param string[] $currencies
36
	 * @param string[] $domains
37
	 * @param bool     $enabled
38
	 */
39
	public function __construct(string $name, array $languages, array $countries, array $currencies, array $domains, bool $enabled = TRUE)
40
	{
41
		$this->name = $name;
42
		$this->languages = $languages;
43
		$this->countries = $countries;
44
		$this->currencies = $currencies;
45
		$this->domains = $domains;
46
		$this->enabled = $enabled;
47
	}
48
49
	/**
50
	 * @return string
51
	 */
52
	public function getName(): string
53
	{
54
		return $this->name;
55
	}
56
57
	/**
58
	 * @return array
59
	 */
60
	public function getCountries(): array
61
	{
62
		return $this->countries;
63
	}
64
65
	/**
66
	 * @return array
67
	 */
68
	public function getLanguages(): array
69
	{
70
		return $this->languages;
71
	}
72
73
	/**
74
	 * @return array
75
	 */
76
	public function getCurrencies(): array
77
	{
78
		return $this->currencies;
79
	}
80
81
	/**
82
	 * @return array
83
	 */
84
	public function getDomains(): array
85
	{
86
		return $this->domains;
87
	}
88
89
	/**
90
	 * @return bool
91
	 */
92
	public function isEnabled(): bool
93
	{
94
		return $this->enabled;
95
	}
96
}
97