DocLibrary   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 18
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Test Coverage

Coverage 100%

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A index() 0 8 2
A library() 0 4 1
1
<?php
2
namespace Desmond\functions;
3
4
class DocLibrary
5
{
6
    private $library = [];
7
8 3
    public function index()
9
    {
10 3
        foreach (FileOperations::getDocFiles() as $file) {
11 3
            $class = sprintf('Desmond\\functions\\docs\\%s', substr($file, 0, -4));
12 3
            $doc = new $class;
13 3
            $this->library[$doc->id()] = $doc;
14
        }
15 3
    }
16
17 3
    public function library()
18
    {
19 3
        return $this->library;
20
    }
21
}
22