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

ShipmentsRepository::getTestShipment()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 39
Code Lines 24

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
eloc 24
dl 0
loc 39
rs 9.536
c 0
b 0
f 0
cc 1
nc 1
nop 0
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