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.

ShippingWrapper   A
last analyzed

Complexity

Total Complexity 5

Size/Duplication

Total Lines 73
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 5
c 1
b 0
f 0
lcom 1
cbo 1
dl 0
loc 73
rs 10

5 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A confirm() 0 13 1
A accept() 0 4 1
A void() 0 4 1
A recoverLabel() 0 13 1
1
<?php
2
3
namespace Octante\UpsAPIBundle\Library;
4
5
/*
6
 * This file is part of the UpsAPIBundle package.
7
 *
8
 * (c) Issel Guberna <[email protected]>
9
 *
10
 * For the full copyright and license information, please view the LICENSE
11
 * file that was distributed with this source code.
12
 */
13
14
use Ups\Entity\Shipment;
15
use Ups\Entity\ShipmentRequestLabelSpecification;
16
use Ups\Entity\ShipmentRequestReceiptSpecification;
17
18
class ShippingWrapper
19
{
20
    /**
21
     * @var \Ups\Shipping
22
     */
23
    private $upsShipping;
24
25
    /**
26
     * Shipping constructor.
27
     *
28
     * @param \Ups\Shipping $upsShipping
29
     */
30
    public function __construct(\Ups\Shipping $upsShipping)
31
    {
32
        $this->upsShipping = $upsShipping;
33
    }
34
35
    /**
36
     * @param $validation
37
     * @param Shipment                                 $shipment
38
     * @param ShipmentRequestLabelSpecification|null   $labelSpec
39
     * @param ShipmentRequestReceiptSpecification|null $receiptSpec
40
     */
41
    public function confirm(
42
        $validation,
43
        Shipment $shipment,
44
        ShipmentRequestLabelSpecification $labelSpec = null,
45
        ShipmentRequestReceiptSpecification $receiptSpec = null
46
    ) {
47
        $this->upsShipping->confirm(
48
            $validation,
49
            $shipment,
50
            $labelSpec,
51
            $receiptSpec
52
        );
53
    }
54
55
    /**
56
     * @param $shipmentDigest
57
     */
58
    public function accept($shipmentDigest)
59
    {
60
        $this->upsShipping->accept($shipmentDigest);
61
    }
62
63
    /**
64
     * @param $shipmentData
65
     */
66
    public function void($shipmentData)
67
    {
68
        $this->upsShipping->void($shipmentData);
69
    }
70
71
    /**
72
     * @param $trackingData
73
     * @param null $labelSpecification
74
     * @param null $labelDelivery
75
     * @param null $translate
76
     */
77
    public function recoverLabel(
78
        $trackingData,
79
        $labelSpecification = null,
80
        $labelDelivery = null,
81
        $translate = null
82
    ) {
83
        $this->upsShipping->recoverLabel(
84
            $trackingData,
85
            $labelSpecification,
86
            $labelDelivery,
87
            $translate
88
        );
89
    }
90
}
91