Completed
Pull Request — master (#526)
by Michael
01:57
created

Environment   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 15
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 5
c 1
b 0
f 0
dl 0
loc 15
ccs 0
cts 6
cp 0
rs 10
wmc 2

1 Method

Rating   Name   Duplication   Size   Complexity  
A getToolVersion() 0 7 2
1
<?php
2
3
/**
4
 * Class providing information about the tool's runtime environment
5
 */
6
class Environment
7
{
8
	private static $toolVersion;
9
10
	/**
11
	 * Gets the tool version, using cached data if available.
12
	 * @return string
13
	 */
14
	public static function getToolVersion()
15
	{
16
		if (self::$toolVersion == false) {
17
			self::$toolVersion = exec("git describe --always --dirty");
18
		}
19
20
		return self::$toolVersion;
21
	}
22
}
23