FetchErrorEvent   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 38
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Test Coverage

Coverage 50%

Importance

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

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 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