GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.

ExchangeRate::getDate()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 0
1
<?php
2
3
declare(strict_types=1);
4
5
namespace SteffenBrand\CurrCurr\Model;
6
7
/**
8
 * Class ExchangeRate
9
 * @package SteffenBrand\CurrCurr\Model
10
 */
11
class ExchangeRate
12
{
13
    /**
14
     * @var \DateTime
15
     */
16
    private $date;
17
18
    /**
19
     * @var string
20
     */
21
    private $currency;
22
23
    /**
24
     * @var float
25
     */
26
    private $rate;
27
28
    /**
29
     * ExchangeRate constructor.
30
     *
31
     * @param string $currency
32
     * @param float $rate
33
     * @param \DateTime $date
34
     */
35
    public function __construct(string $currency, float $rate, \DateTime $date)
36
    {
37
        $this->currency = $currency;
38
        $this->rate = $rate;
39
        $this->date = $date;
40
    }
41
42
    /**
43
     * @return string The abbreviation of the currency
44
     */
45
    public function getCurrency(): string
46
    {
47
        return $this->currency;
48
    }
49
50
    /**
51
     * @return float The exchange rate based on EUR
52
     */
53
    public function getRate(): float
54
    {
55
        return $this->rate;
56
    }
57
58
    /**
59
     * @return \DateTime The date on which this exchange rate is valid
60
     */
61
    public function getDate(): \DateTime
62
    {
63
        return $this->date;
64
    }
65
}