InxmailToUtilDateTimeServiceBridge   A
last analyzed

Complexity

Total Complexity 4

Size/Duplication

Total Lines 43
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 4
eloc 6
c 1
b 0
f 0
dl 0
loc 43
rs 10

4 Methods

Rating   Name   Duplication   Size   Complexity  
A formatTime() 0 3 1
A formatDate() 0 3 1
A formatDateTime() 0 3 1
A __construct() 0 3 1
1
<?php
2
3
/**
4
 * MIT License
5
 * For full license information, please view the LICENSE file that was distributed with this source code.
6
 */
7
8
namespace SprykerEco\Zed\Inxmail\Dependency\Service;
9
10
class InxmailToUtilDateTimeServiceBridge implements InxmailToUtilDateTimeServiceInterface
11
{
12
    /**
13
     * @var \Spryker\Service\UtilDateTime\UtilDateTimeServiceInterface
14
     */
15
    protected $utilDateTimeService;
16
17
    /**
18
     * @param \Spryker\Service\UtilDateTime\UtilDateTimeServiceInterface $utilDateTimeService
19
     */
20
    public function __construct($utilDateTimeService)
21
    {
22
        $this->utilDateTimeService = $utilDateTimeService;
23
    }
24
25
    /**
26
     * @param \DateTime|string $date
27
     *
28
     * @return string
29
     */
30
    public function formatDate($date): string
31
    {
32
        return $this->utilDateTimeService->formatDate($date);
33
    }
34
35
    /**
36
     * @param \DateTime|string $date
37
     *
38
     * @return string
39
     */
40
    public function formatDateTime($date): string
41
    {
42
        return $this->utilDateTimeService->formatDateTime($date);
43
    }
44
45
    /**
46
     * @param \DateTime|string $date
47
     *
48
     * @return string
49
     */
50
    public function formatTime($date): string
51
    {
52
        return $this->utilDateTimeService->formatTime($date);
53
    }
54
}
55