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.

CreateObject   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 14
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 3

Importance

Changes 0
Metric Value
wmc 1
lcom 1
cbo 3
dl 0
loc 14
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A getRate() 0 4 1
1
<?php
2
3
namespace ShippoClient\Http\Request\Transactions;
4
5
use ShippoClient\Http\Request\CommonParameter;
6
use TurmericSpice\Container\InvalidAttributeException;
7
8
/**
9
 * A Transaction is the purchase of a Shipment Label for a given Shipment Rate.
10
 * Transactions can be as simple as posting a Rate ID, but also allow you to define further parameters of the desired Label, such as pickup and notifications.
0 ignored issues
show
Coding Style introduced by
This line exceeds maximum limit of 120 characters; contains 158 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...
11
 * Transactions can only be created for Rates that are less than 7 days old and that have an object_purpose of "PURCHASE".
0 ignored issues
show
Coding Style introduced by
This line exceeds maximum limit of 120 characters; contains 122 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
 * Transactions are created asynchronous. The response time depends exclusively on the carrier's server.
13
 */
14
class CreateObject extends CommonParameter
15
{
16
    /**
17
     * ID of the Rate object for which a Label has to be obtained.
18
     * Please note that only rates that are not older than 7 days can be purchased in order to ensure up-to-date pricing.
0 ignored issues
show
Coding Style introduced by
This line exceeds maximum limit of 120 characters; contains 121 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...
19
     *
20
     * @return string
21
     * @throws InvalidAttributeException
22
     */
23
    public function getRate()
24
    {
25
        return $this->attributes->mustHave('rate')->asString();
26
    }
27
}
28