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.
Completed
Push — master ( f1cd39...fb8f78 )
by Andreas
03:42
created

ContactBuilder   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 23
Duplicated Lines 0 %

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A buildWithMagentoCustomer() 0 6 1
A buildWithSubscriber() 0 4 1
1
<?php
2
declare(strict_types=1);
3
/**
4
 */
5
6
namespace CommerceLeague\ActiveCampaign\Gateway\Request;
7
8
use Magento\Customer\Model\Customer as MagentoCustomer;
9
use Magento\Newsletter\Model\Subscriber;
10
11
/**
12
 * Class ContactBuilder
13
 */
14
class ContactBuilder
15
{
16
    /**
17
     * @param MagentoCustomer $magentoCustomer
18
     * @return array
19
     */
20
    public function buildWithMagentoCustomer(MagentoCustomer $magentoCustomer): array
21
    {
22
        return [
23
            'email' => $magentoCustomer->getData('email'),
24
            'firstName' => $magentoCustomer->getData('firstname'),
25
            'lastName' => $magentoCustomer->getData('lastname')
26
        ];
27
    }
28
29
    /**
30
     * @param Subscriber $subscriber
31
     * @return array
32
     */
33
    public function buildWithSubscriber(Subscriber $subscriber): array
34
    {
35
        return [
36
            'email' => $subscriber->getEmail()
37
        ];
38
    }
39
}
40