Completed
Push — master ( 3c4d84...92e7ec )
by Vladimir
02:30
created

Service   A

Complexity

Total Complexity 4

Size/Duplication

Total Lines 25
Duplicated Lines 0 %

Coupling/Cohesion

Components 2
Dependencies 0

Test Coverage

Coverage 66.67%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 4
lcom 2
cbo 0
dl 0
loc 25
ccs 6
cts 9
cp 0.6667
rs 10
c 1
b 0
f 0

4 Methods

Rating   Name   Duplication   Size   Complexity  
A getParameter() 0 4 1
A setParameter() 0 4 1
A getWorkingDirectory() 0 4 1
A setWorkingDirectory() 0 4 1
1
<?php
2
3
/**
4
 * @copyright 2017 Vladimir Jimenez
5
 * @license   https://github.com/allejo/stakx/blob/master/LICENSE.md MIT
6
 */
7
8
namespace allejo\stakx;
9
10
abstract class Service
11
{
12
    protected static $workingDirectory;
13
    protected static $parameters;
14
15 30
    public static function getParameter($key)
0 ignored issues
show
Documentation introduced by
The return type could not be reliably inferred; please add a @return annotation.

Our type inference engine in quite powerful, but sometimes the code does not provide enough clues to go by. In these cases we request you to add a @return annotation as described here.

Loading history...
16
    {
17 30
        return self::$parameters[$key];
18
    }
19
20 310
    public static function setParameter($key, $value)
0 ignored issues
show
Documentation introduced by
The return type could not be reliably inferred; please add a @return annotation.

Our type inference engine in quite powerful, but sometimes the code does not provide enough clues to go by. In these cases we request you to add a @return annotation as described here.

Loading history...
21
    {
22 310
        return (self::$parameters[$key] = $value);
23
    }
24
25 165
    public static function getWorkingDirectory()
0 ignored issues
show
Documentation introduced by
The return type could not be reliably inferred; please add a @return annotation.

Our type inference engine in quite powerful, but sometimes the code does not provide enough clues to go by. In these cases we request you to add a @return annotation as described here.

Loading history...
26
    {
27 165
        return self::$workingDirectory;
28
    }
29
30
    public static function setWorkingDirectory($directory)
31
    {
32
        self::$workingDirectory = $directory;
33
    }
34
}
35