Config::__construct()   A
last analyzed

Complexity

Conditions 2
Paths 2

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 2
eloc 2
c 1
b 0
f 0
nc 2
nop 1
dl 0
loc 4
rs 10
1
<?php
2
3
namespace FigTree\Config;
4
5
use FigTree\Config\Contracts\{
6
	ConfigReaderInterface,
7
};
8
9
class Config extends AbstractConfig
10
{
11
	/**
12
	 * Construct an instance of Config.
13
	 */
14
	public function __construct(array $paths)
15
	{
16
		foreach ($paths as $path) {
17
			$this->addPath($path);
18
		}
19
	}
20
21
	/**
22
	 * Create a ConfigReader instance.
23
	 *
24
	 * @return \FigTree\Config\Contracts\ConfigReaderInterface
25
	 */
26
	public function createReader(): ConfigReaderInterface
27
	{
28
		return new ConfigReader();
29
	}
30
}
31