Completed
Push — master ( 11ee78...8b3cbf )
by Thomas
04:46
created

SystemPreferences::getApiVersion()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 3
rs 10
ccs 0
cts 0
cp 0
cc 1
eloc 2
nc 1
nop 0
crap 2
1
<?php
2
namespace keeko\core\preferences;
3
4
use keeko\core\preferences\Preferences;
5
6
class SystemPreferences extends Preferences {
7
8
	const VERSION = 'version';
0 ignored issues
show
Coding Style introduced by
Equals sign not aligned with surrounding assignments; expected 8 spaces but found 1 space

This check looks for multiple assignments in successive lines of code. It will report an issue if the operators are not in a straight line.

To visualize

$a = "a";
$ab = "ab";
$abc = "abc";

will produce issues in the first and second line, while this second example

$a   = "a";
$ab  = "ab";
$abc = "abc";

will produce no issues.

Loading history...
9
	const PLATTFORM_NAME = 'plattform_name';
10
	const ROOT_URL = 'root_url';
0 ignored issues
show
Coding Style introduced by
Equals sign not aligned with surrounding assignments; expected 7 spaces but found 1 space

This check looks for multiple assignments in successive lines of code. It will report an issue if the operators are not in a straight line.

To visualize

$a = "a";
$ab = "ab";
$abc = "abc";

will produce issues in the first and second line, while this second example

$a   = "a";
$ab  = "ab";
$abc = "abc";

will produce no issues.

Loading history...
11
	const API_URL = 'api_url';
0 ignored issues
show
Coding Style introduced by
Equals sign not aligned with surrounding assignments; expected 8 spaces but found 1 space

This check looks for multiple assignments in successive lines of code. It will report an issue if the operators are not in a straight line.

To visualize

$a = "a";
$ab = "ab";
$abc = "abc";

will produce issues in the first and second line, while this second example

$a   = "a";
$ab  = "ab";
$abc = "abc";

will produce no issues.

Loading history...
12
	const API_VERSION = 'api_version';
0 ignored issues
show
Coding Style introduced by
Equals sign not aligned with surrounding assignments; expected 4 spaces but found 1 space

This check looks for multiple assignments in successive lines of code. It will report an issue if the operators are not in a straight line.

To visualize

$a = "a";
$ab = "ab";
$abc = "abc";

will produce issues in the first and second line, while this second example

$a   = "a";
$ab  = "ab";
$abc = "abc";

will produce no issues.

Loading history...
13
	
14
	/**
15
	 * Returns the plattforms name
16
	 *
17
	 * @return string
18
	 */
19
	public function getPlattformName() {
20
		return $this->get(self::PLATTFORM_NAME);
21
	}
22
	
23
	/**
24
	 * Returns the url to the public API
25
	 *
26
	 * @return string
27
	 */
28
	public function getApiUrl() {
29
		return $this->get(self::API_URL);
30
	}
31
	
32
	/**
33
	 * Returns the API version
34
	 *
35
	 * @return string
36
	 */
37
	public function getApiVersion() {
38
		return $this->get(self::API_VERSION);
39
	}
40
	
41
	/**
42
	 * Returns the plattform version (keeko/core)
43
	 *
44
	 * @return string
45
	 */
46
	public function getVersion() {
47
		return $this->get(self::VERSION);
48
	}
49
	
50
	/**
51
	 * Returns the root url for the installed plattform
52
	 *
53
	 * @return string
54
	 */
55
	public function getRootUrl() {
56
		return $this->get(self::ROOT_URL);
57
	}
58
}