Passed
Push — master ( 0ccc28...b9f253 )
by Radu
01:49
created

ShipmentsRepository   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 41
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 1
eloc 25
dl 0
loc 41
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A getTestShipment() 0 39 1
1
<?php
2
namespace ParcelValue\ApiClient\Domain\Shipments;
3
4
final class ShipmentsRepository extends \ParcelValue\ApiClient\AbstractRepository
5
{
6
    public function getTestShipment()
7
    {
8
        $shipment = new \ParcelValue\Api\JsonApi\ResourceObjects\Shipment();
9
10
        /* */
11
        $shipment->setAttribute(
12
            'shipFrom',
13
            [
14
                'name' => 'Sender name',
15
                'address1' => 'Sender street',
16
                'city' => 'Milano',
17
                'postalCode' => '20129',
18
                'state' => 'MI',
19
                'country' => 'IT',
20
                'contact' => 'Sender contact name',
21
                'phone' => '1234567890',
22
                'email' => '[email protected]'
23
            ]
24
        );
25
        /* */
26
27
        /* */
28
        $shipment->setAttribute(
29
            'shipTo',
30
            [
31
                'name' => 'Receiver name',
32
                'address1' => 'Receiver street',
33
                'city' => 'Muenchen',
34
                'postalCode' => '80331',
35
                'state' => null,
36
                'country' => 'DE',
37
                'contact' => 'Receiver contact name',
38
                'phone' => '0987654321',
39
                'email' => '[email protected]'
40
            ]
41
        );
42
        /* */
43
44
        return $shipment;
45
    }
46
}
47