FetchErrorEvent::getDate()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
dl 0
loc 4
ccs 0
cts 2
cp 0
rs 10
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 0
crap 2
1
<?php
2
/*
3
 * This file is part of the Exchange Rate Bundle, an RunOpenCode project.
4
 *
5
 * (c) 2017 RunOpenCode
6
 *
7
 * For the full copyright and license information, please view the LICENSE
8
 * file that was distributed with this source code.
9
 */
10
namespace RunOpenCode\Bundle\ExchangeRate\Event;
11
12
use Symfony\Component\EventDispatcher\Event;
13
14
/**
15
 * Class FetchErrorEvent
16
 *
17
 * @package RunOpenCode\Bundle\ExchangeRate\Event
18
 */
19
class FetchErrorEvent extends Event
20
{
21
    /**
22
     * @var array
23
     */
24
    private $errors;
25
26
    /**
27
     * @var \DateTime
28
     */
29
    private $date;
30
31 2
    public function __construct(array $errors, \DateTime $date)
32
    {
33 2
        $this->errors = $errors;
34 2
        $this->date = $date;
35 2
    }
36
37
    /**
38
     * Get errors.
39
     *
40
     * @return array
41
     */
42
    public function getErrors()
43
    {
44
        return $this->errors;
45
    }
46
47
    /**
48
     * Get date for which rates are fetched.
49
     *
50
     * @return \DateTime
51
     */
52
    public function getDate()
53
    {
54
        return $this->date;
55
    }
56
}
57