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

GuardCoverageFileReader::read()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 8
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 2
Bugs 0 Features 1
Metric Value
c 2
b 0
f 1
dl 0
loc 8
rs 9.4285
cc 2
eloc 4
nc 2
nop 0
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