Passed
Branch master (461ffe)
by João Felipe Magro
05:37 queued 02:32
created

BaseResource   A

Complexity

Total Complexity 4

Size/Duplication

Total Lines 36
Duplicated Lines 0 %

Coupling/Cohesion

Components 2
Dependencies 2

Importance

Changes 0
Metric Value
wmc 4
lcom 2
cbo 2
dl 0
loc 36
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A getNumberUtil() 0 8 2
A getObjectUtil() 0 8 2
1
<?php
2
3
namespace Ipag\Classes;
4
5
abstract class BaseResource
6
{
7
    /**
8
     * @var Util\NumberUtil
9
     */
10
    private $numberUtil;
11
12
    /**
13
     * @var Util\ObjectUtil
14
     */
15
    private $objectUtil;
16
17
    /**
18
     * @return Util\NumberUtil
19
     */
20
    public function getNumberUtil()
21
    {
22
        if (is_null($this->numberUtil)) {
23
            $this->numberUtil = new Util\NumberUtil();
24
        }
25
26
        return $this->numberUtil;
27
    }
28
29
    /**
30
     * @return Util\ObjectUtil
31
     */
32
    public function getObjectUtil()
33
    {
34
        if (is_null($this->objectUtil)) {
35
            $this->objectUtil = new Util\ObjectUtil();
36
        }
37
38
        return $this->objectUtil;
39
    }
40
}
41