Completed
Push — master ( c26a33...30a943 )
by Dmitry
05:28 queued 02:30
created

Contents   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 15
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Test Coverage

Coverage 0%

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A run() 0 10 2
1
<?php
2
3
namespace Basis\Job\Module;
4
5
use Basis\Job;
6
use Exception;
7
8
class Contents extends Job
9
{
10
    public $path;
11
12
    public function run()
13
    {
14
        if (!$this->path) {
15
            throw new Exception("Invalid path {$this->path}", 1);
16
        }
17
18
        $contents = file_get_contents($this->path);
19
20
        return compact('contents');
21
    }
22
}
23