Completed
Push — master ( 461ffe...a27db3 )
by João Felipe Magro
12:47
created

BaseResource::getDateUtil()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 8
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 8
rs 9.4285
c 0
b 0
f 0
cc 2
eloc 4
nc 2
nop 0
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
     * @var Util\DateUtil
19
     */
20
    private $dateUtil;
21
22
    /**
23
     * @return Util\NumberUtil
24
     */
25
    public function getNumberUtil()
26
    {
27
        if (is_null($this->numberUtil)) {
28
            $this->numberUtil = new Util\NumberUtil();
29
        }
30
31
        return $this->numberUtil;
32
    }
33
34
    /**
35
     * @return Util\ObjectUtil
36
     */
37
    public function getObjectUtil()
38
    {
39
        if (is_null($this->objectUtil)) {
40
            $this->objectUtil = new Util\ObjectUtil();
41
        }
42
43
        return $this->objectUtil;
44
    }
45
46
    /**
47
     * @return Util\DateUtil
48
     */
49
    public function getDateUtil()
50
    {
51
        if (is_null($this->dateUtil)) {
52
            $this->dateUtil = new Util\DateUtil();
53
        }
54
55
        return $this->dateUtil;
56
    }
57
}
58