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.
Passed
Push — master ( f51f95...468920 )
by Andreas
03:39
created

AbstractBuilder   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 19
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 1
Metric Value
eloc 3
c 1
b 0
f 1
dl 0
loc 19
rs 10
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A formatDateTime() 0 3 1
A convertToCent() 0 3 1
1
<?php
2
declare(strict_types=1);
3
/**
4
 */
5
6
namespace CommerceLeague\ActiveCampaign\Gateway\Request;
7
8
/**
9
 * Class AbstractBuilder
10
 */
11
abstract class AbstractBuilder
12
{
13
    /**
14
     * @param float $amount
15
     * @return int
16
     */
17
    protected function convertToCent(float $amount): int
18
    {
19
        return (int)($amount * 100);
20
    }
21
22
    /**
23
     * @param string $date
24
     * @return string
25
     * @throws \Exception
26
     */
27
    protected  function formatDateTime(string $date): string
28
    {
29
        return (new \DateTime($date))->format(\DateTime::W3C);
30
    }
31
}
32