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 ( ad4463...4d14c7 )
by Andreas
03:15
created

ContactRequestBuilder::buildWithSubscriber()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 2
nc 1
nop 1
dl 0
loc 4
rs 10
c 0
b 0
f 0
1
<?php
2
declare(strict_types=1);
3
4
namespace CommerceLeague\ActiveCampaign\Gateway\Request;
5
6
use Magento\Customer\Model\Customer;
7
use Magento\Newsletter\Model\Subscriber;
8
9
/**
10
 * Class ContactRequestBuilder
11
 */
12
class ContactRequestBuilder
13
{
14
    /**
15
     * @param Customer $customer
16
     * @return array
17
     */
18
    public function buildWithCustomer(Customer $customer): array
19
    {
20
        return [
21
            'email' => $customer->getData('email'),
22
            'firstName' => $customer->getData('firstname'),
23
            'lastName' => $customer->getData('lastname')
24
        ];
25
    }
26
27
    /**
28
     * @param Subscriber $subscriber
29
     * @return array
30
     */
31
    public function buildWithSubscriber(Subscriber $subscriber): array
32
    {
33
        return [
34
            'email' => $subscriber->getEmail()
35
        ];
36
    }
37
}
38