PhpArrayFile   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 15
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 0
Metric Value
wmc 2
lcom 0
cbo 0
dl 0
loc 15
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A toArray() 0 4 1
1
<?php
2
namespace ConfigTree\FileParsing\Formats;
3
4
use ConfigTree\FileParsing\ArrayableFile;
5
6
class PhpArrayFile implements ArrayableFile
7
{
8
    /** @var string */
9
    private $path;
10
11
    public function __construct(string $path)
12
    {
13
        $this->path = $path;
14
    }
15
16
    public function toArray() : array
17
    {
18
        return require $this->path;
19
    }
20
}
21