Passed
Push — master ( 3d4557...4c2a8d )
by Hannes
01:54
created

Version   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 11
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 1
Metric Value
wmc 2
eloc 5
c 1
b 0
f 1
dl 0
loc 11
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A getVersion() 0 7 2
1
<?php
2
3
declare(strict_types=1);
4
5
namespace hanneskod\readmetester;
6
7
final class Version
8
{
9
    private const VERSION_FILE = __DIR__ . '/../VERSION';
10
11
    public static function getVersion(): string
12
    {
13
        if (is_readable(self::VERSION_FILE)) {
14
            return trim((string)file_get_contents(self::VERSION_FILE));
15
        }
16
17
        return 'dev-master';
18
    }
19
}
20