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.

Rate   A
last analyzed

Complexity

Total Complexity 5

Size/Duplication

Total Lines 76
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 4

Importance

Changes 0
Metric Value
wmc 5
lcom 1
cbo 4
dl 0
loc 76
rs 10
c 0
b 0
f 0

5 Methods

Rating   Name   Duplication   Size   Complexity  
A getAvailableShippo() 0 4 1
A getOutboundEndpoint() 0 4 1
A getInboundEndpoint() 0 4 1
A getArrivesBy() 0 4 1
A getDeliveryAttempts() 0 4 1
1
<?php
2
3
namespace ShippoClient\Entity;
4
5
use TurmericSpice\ReadableAttributes;
6
7
/**
8
 * Each valid Shipment object will automatically trigger the calculation of all available Rates.
9
 * Depending on your Addresses and Parcel, there may be none, one or multiple Rates.
10
 *
11
 * By default, the calculated Rates will return the price in two currencies under the "amount" and "amount_local" keys, respectively.
0 ignored issues
show
Coding Style introduced by
This line exceeds maximum limit of 120 characters; contains 133 characters

Overly long lines are hard to read on any screen. Most code styles therefor impose a maximum limit on the number of characters in a line.

Loading history...
12
 * The "amount" key will contain the price of a Rate expressed in the currency that is used in the country from which Parcel originates,
0 ignored issues
show
Coding Style introduced by
This line exceeds maximum limit of 120 characters; contains 136 characters

Overly long lines are hard to read on any screen. Most code styles therefor impose a maximum limit on the number of characters in a line.

Loading history...
13
 * and the "amount_local" key will contain the price expressed in the currency that is used in the country the Parcel is shipped to.
0 ignored issues
show
Coding Style introduced by
This line exceeds maximum limit of 120 characters; contains 132 characters

Overly long lines are hard to read on any screen. Most code styles therefor impose a maximum limit on the number of characters in a line.

Loading history...
14
 * You can request Rates with prices expressed in a different currency by adding the desired currency code in the end of the resource URL.
0 ignored issues
show
Coding Style introduced by
This line exceeds maximum limit of 120 characters; contains 138 characters

Overly long lines are hard to read on any screen. Most code styles therefor impose a maximum limit on the number of characters in a line.

Loading history...
15
 * The full list of supported currencies along with their codes can be viewed on open exchange rates.
16
 *
17
 * Rates are created asynchronously. The response time depends exclusively on the carrier's server.
18
 */
19
class Rate extends ObjectInformation
20
{
21
    use ReadableAttributes {
22
        mayHaveAsString  as public getShipment;
23
        mayHaveAsArray   as public getAttributes;
24
        mayHaveAsFloat   as public getAmountLocal;
25
        mayHaveAsString  as public getCurrencyLocal;
26
        mayHaveAsFloat   as public getAmount;
27
        mayHaveAsString  as public getCurrency;
28
        mayHaveAsString  as public getProvider;
29
        mayHaveAsString  as public getServicelevelName;
30
        mayHaveAsString  as public getServicelevelTerms;
31
        mayHaveAsInt     as public getDays;
32
        mayHaveAsBoolean as public getTrackable;
33
        mayHaveAsBoolean as public getInsurance;
34
        mayHaveAsFloat   as public getInsuranceAmountLocal;
35
        mayHaveAsString  as public getInsuranceCurrencyLocal;
36
        mayHaveAsFloat   as public getInsuranceAmount;
37
        mayHaveAsString  as public getInsuranceCurrency;
38
        mayHaveAsString  as public getCarrierAccount;
39
        mayHaveAsString  as public getDurationTerms;
40
        mayHaveAsArray   as public getMessages;
41
        mayHaveAsString  as public getProviderImage_75;
42
        mayHaveAsString  as public getProviderImage_200;
43
    }
44
45
    /**
46
     * Description is not found in Shippo API doc, but this key is returned in fact.
47
     *
48
     * @return mixed|null
49
     */
50
    public function getAvailableShippo()
51
    {
52
        return $this->attributes->mayHave('available_shippo')->value();
53
    }
54
55
    /**
56
     * Description is not found in Shippo API doc, but this key is returned in fact.
57
     *
58
     * @return mixed|null
59
     */
60
    public function getOutboundEndpoint()
61
    {
62
        return $this->attributes->mayHave('outbound_endpoint')->value();
63
    }
64
65
    /**
66
     * Description is not found in Shippo API doc, but this key is returned in fact.
67
     *
68
     * @return mixed|null
69
     */
70
    public function getInboundEndpoint()
71
    {
72
        return $this->attributes->mayHave('inbound_endpoint')->value();
73
    }
74
75
    /**
76
     * Description is not found in Shippo API doc, but this key is returned in fact.
77
     *
78
     * @return mixed|null
79
     */
80
    public function getArrivesBy()
81
    {
82
        return $this->attributes->mayHave('arrives_by')->value();
83
    }
84
85
    /**
86
     * Description is not found in Shippo API doc, but this key is returned in fact.
87
     *
88
     * @return mixed|null
89
     */
90
    public function getDeliveryAttempts()
91
    {
92
        return $this->attributes->mayHave('delivery_attempts')->value();
93
    }
94
}
95