FileContentsRetriever   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 13
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A fileGetContents() 0 7 2
1
<?php
2
namespace ConfigTree\FileParsing\Reading;
3
4
use ConfigTree\Exception\FileNotReadable;
5
6
class FileContentsRetriever
7
{
8
    /**
9
     * @throws FileNotReadable
10
     */
11
    public function fileGetContents(string $path) : string
12
    {
13
        if (!is_readable($path)) {
14
            throw FileNotReadable::constructWithPath($path);
15
        }
16
        return file_get_contents($path);
17
    }
18
}
19