Passed
Push — master ( 7403b6...1afc4e )
by Radu
01:44
created

Shipment   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 18
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 10
dl 0
loc 18
rs 10
c 0
b 0
f 0
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 5 1
A setService() 0 4 1
1
<?php
2
namespace ParcelValue\Api\JsonApi\ResourceObjects;
3
4
class Shipment extends \WebServCo\Api\JsonApi\AbstractResourceObject
5
{
6
    const TYPE = 'shipment';
7
    const DATE_FORMAT = 'Y-m-d';
8
    const SERVICE_ECONOMY = 'economy';
9
    const SERVICE_EXPRESS = 'express';
10
11
    public function __construct($id = null)
12
    {
13
        parent::__construct();
14
        $this->setId($id);
15
        $this->setType(self::TYPE);
16
    }
17
18
    public function setService($service)
19
    {
20
        $this->setMeta('service', $service);
21
        return true;
22
    }
23
}
24