Passed
Push — master ( 44e71f...97e7bf )
by Ehsan
03:23
created

AbstractClient   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 27
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 3
lcom 1
cbo 1
dl 0
loc 27
ccs 7
cts 7
cp 1
rs 10
c 0
b 0
f 0

3 Methods

Rating   Name   Duplication   Size   Complexity  
A getArrayUtility() 0 8 2
A setArrayUtility() 0 4 1
apiCall() 0 1 ?
1
<?php
2
3
namespace Botonomous\client;
4
5
use Botonomous\utility\ArrayUtility;
6
7
/**
8
 * Class AbstractClient.
9
 */
10
abstract class AbstractClient
11
{
12
    private $arrayUtility;
13
14
15
    /**
16
     * @return ArrayUtility
17
     */
18 31
    public function getArrayUtility()
19
    {
20 31
        if (!isset($this->arrayUtility)) {
21 31
            $this->setArrayUtility(new ArrayUtility());
22
        }
23
24 31
        return $this->arrayUtility;
25
    }
26
27
    /**
28
     * @param ArrayUtility $arrayUtility
29
     */
30 31
    public function setArrayUtility(ArrayUtility $arrayUtility)
31
    {
32 31
        $this->arrayUtility = $arrayUtility;
33 31
    }
34
35
    abstract function apiCall($method, array $arguments = []);
0 ignored issues
show
Best Practice introduced by
It is generally recommended to explicitly declare the visibility for methods.

Adding explicit visibility (private, protected, or public) is generally recommend to communicate to other developers how, and from where this method is intended to be used.

Loading history...
36
}
37