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

Environment   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 17
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 0

Test Coverage

Coverage 0%

Importance

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

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