Completed
Push — master ( bf7cab...431275 )
by Nikola
05:17
created

FetchErrorEvent   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 38
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Test Coverage

Coverage 100%

Importance

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

3 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 5 1
A getErrors() 0 4 1
A getDate() 0 4 1
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 RunOpenCode\Bundle\ExchangeRate\Exception\LogicException;
13
use Symfony\Component\EventDispatcher\Event;
14
15
/**
16
 * Class FetchErrorEvent
17
 *
18
 * @package RunOpenCode\Bundle\ExchangeRate\Event
19
 */
20
class FetchErrorEvent extends Event
21
{
22
    /**
23
     * @var array
24
     */
25
    private $errors;
26
27
    /**
28
     * @var \DateTime
29
     */
30
    private $date;
31
32 3
    public function __construct(array $errors, \DateTime $date)
33
    {
34 3
        $this->errors = $errors;
35 3
        $this->date = $date;
36 3
    }
37
38
    /**
39
     * Get errors.
40
     *
41
     * @return array
42
     */
43 2
    public function getErrors()
44
    {
45 2
        return $this->errors;
46
    }
47
48
    /**
49
     * Get date for which rates are fetched.
50
     *
51
     * @return \DateTime
52
     */
53 1
    public function getDate()
54
    {
55 1
        return $this->date;
56
    }
57
}
58