Completed
Push — master ( 236db5...b6d10e )
by Pablo
7s
created

GuardCoverageFileReader   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 16
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A read() 0 8 2
1
<?php
2
3
namespace PhpGitHooks\Module\PhpUnit\Infrastructure\Tool;
4
5
use PhpGitHooks\Module\PhpUnit\Model\GuardCoverageFileReaderInterface;
6
7
class GuardCoverageFileReader implements GuardCoverageFileReaderInterface
8
{
9
    const FILE = '.guard_coverage';
10
11
    /**
12
     * @return string
13
     */
14
    public function read()
15
    {
16
        if (false === file_exists(self::FILE)) {
17
            return 0.00;
18
        }
19
20
        return file_get_contents(self::FILE);
21
    }
22
}
23