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.

Issues (53)

Security Analysis    no request data  

This project does not seem to handle request data directly as such no vulnerable execution paths were found.

  Cross-Site Scripting
Cross-Site Scripting enables an attacker to inject code into the response of a web-request that is viewed by other users. It can for example be used to bypass access controls, or even to take over other users' accounts.
  File Exposure
File Exposure allows an attacker to gain access to local files that he should not be able to access. These files can for example include database credentials, or other configuration files.
  File Manipulation
File Manipulation enables an attacker to write custom data to files. This potentially leads to injection of arbitrary code on the server.
  Object Injection
Object Injection enables an attacker to inject an object into PHP code, and can lead to arbitrary code execution, file exposure, or file manipulation attacks.
  Code Injection
Code Injection enables an attacker to execute arbitrary code on the server.
  Response Splitting
Response Splitting can be used to send arbitrary responses.
  File Inclusion
File Inclusion enables an attacker to inject custom files into PHP's file loading mechanism, either explicitly passed to include, or for example via PHP's auto-loading mechanism.
  Command Injection
Command Injection enables an attacker to inject a shell command that is execute with the privileges of the web-server. This can be used to expose sensitive data, or gain access of your server.
  SQL Injection
SQL Injection enables an attacker to execute arbitrary SQL code on your database server gaining access to user data, or manipulating user data.
  XPath Injection
XPath Injection enables an attacker to modify the parts of XML document that are read. If that XML document is for example used for authentication, this can lead to further vulnerabilities similar to SQL Injection.
  LDAP Injection
LDAP Injection enables an attacker to inject LDAP statements potentially granting permission to run unauthorized queries, or modify content inside the LDAP tree.
  Header Injection
  Other Vulnerability
This category comprises other attack vectors such as manipulating the PHP runtime, loading custom extensions, freezing the runtime, or similar.
  Regex Injection
Regex Injection enables an attacker to execute arbitrary code in your PHP process.
  XML Injection
XML Injection enables an attacker to read files on your local filesystem including configuration files, or can be abused to freeze your web-server process.
  Variable Injection
Variable Injection enables an attacker to overwrite program variables with custom data, and can lead to further vulnerabilities.
Unfortunately, the security analysis is currently not available for your project. If you are a non-commercial open-source project, please contact support to gain access.

src/Entity/Transaction.php (2 issues)

Upgrade to new PHP Analysis Engine

These results are based on our legacy PHP analysis, consider migrating to our new PHP analysis engine instead. Learn more

1
<?php
2
3
namespace ShippoClient\Entity;
4
5
use TurmericSpice\ReadableAttributes;
6
7
/**
8
 * @property \TurmericSpice\Container attributes
9
 */
10
class Transaction extends ObjectInformation
11
{
12
    use ReadableAttributes {
13
        mayHaveAsString  as public getCustomsNote;
14
        mayHaveAsString  as public getSubmissionNote;
15
        mayHaveAsString  as public getMetadata;
16
        toArray          as public __toArray;
17
    }
18
19
    /**
20
     * Indicates the status of the Transaction.
21
     *  - "WAITING"
22
     *  - "QUEUED"
23
     *  - "SUCCESS"
24
     *  - "ERROR"
25
     *  - "REFUNDED"
26
     *  - "REFUNDPENDING"
27
     *  - "REFUNDREJECTED"
28
     *
29
     * @return string
30
     */
31
    public function getObjectStatus()
32
    {
33
        return $this->attributes->mayHave('object_status')->asString();
34
    }
35
36
    /**
37
     * Indicates whether the transaction has been sent to the corresponding carrier's test or production server.
38
     *
39
     * @return bool
40
     */
41
    public function getWasTest()
42
    {
43
        return $this->attributes->mayHave('was_test')->asBoolean();
44
    }
45
46
    /**
47
     * Rate object id.
48
     *
49
     * @return string
50
     */
51
    public function getRate()
52
    {
53
        return $this->attributes->mayHave('rate')->asString();
54
    }
55
56
    /**
57
     * The carrier-specific tracking number that can be used to track the Shipment.
58
     * A value will only be returned if the Rate is for a trackable Shipment and if the Transactions has been processed successfully.
0 ignored issues
show
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...
59
     *
60
     * @return string
61
     */
62
    public function getTrackingNumber()
63
    {
64
        return $this->attributes->mayHave('tracking_number')->asString();
65
    }
66
67
    /**
68
     * The tracking information we currently have on file for this shipment. We regularly update this information.
69
     *
70
     * @return TrackingStatus
71
     */
72
    public function getTrackingStatus()
73
    {
74
        return new TrackingStatus($this->attributes->mayHave('tracking_status')->asArray());
75
    }
76
77
    /**
78
     * @return TrackingHistory
79
     */
80
    public function getTrackingHistory()
81
    {
82
        $entities = $this->attributes->mayHave('tracking_history')
83
            ->asInstanceArray('ShippoClient\\Entity\\TrackingStatus');
84
85
        return new TrackingHistory($entities);
86
    }
87
88
    /**
89
     * A link to track this item on the carrier-provided tracking website.
90
     * A value will only be returned if tracking is available and the carrier provides such a service.
91
     *
92
     * @return string
93
     */
94
    public function getTrackingUrlProvider()
95
    {
96
        return $this->attributes->mayHave('tracking_url_provider')->asString();
97
    }
98
99
    /**
100
     * A URL pointing directly to the label in the format you've set in your settings.
101
     * A value will only be returned if the Transactions has been processed successfully.
102
     *
103
     * @return string
104
     */
105
    public function getLabelUrl()
106
    {
107
        return $this->attributes->mayHave('label_url')->asString();
108
    }
109
110
    /**
111
     * A URL pointing to the commercial invoice as a 8.5x11 inch PDF file.
112
     * A value will only be returned if the Transactions has been processed successfully and if the shipment is international.
0 ignored issues
show
This line exceeds maximum limit of 120 characters; contains 126 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...
113
     *
114
     * @return string
115
     */
116
    public function getCommercialInvoiceUrl()
117
    {
118
        return $this->attributes->mayHave('commercial_invoice_url')->asString();
119
    }
120
121
    /**
122
     * An array containing elements of the following schema:
123
     * "code" (string): an identifier for the corresponding message (not always available")
124
     * "message" (string): a publishable message containing further information.
125
     *
126
     * @return array
127
     */
128
    public function getMessages()
129
    {
130
        return $this->attributes->mayHave('messages')->asArray();
131
    }
132
133
    /**
134
     * @return mixed|null
135
     */
136
    public function getOrder()
137
    {
138
        return $this->attributes->mayHave('order')->value();
139
    }
140
141
    /**
142
     * @return string
143
     */
144
    public function getMetadata()
145
    {
146
        return $this->attributes->mayHave('metadata')->asString();
147
    }
148
149
    public function toArray()
150
    {
151
        $array = $this->__toArray();
152
        $array['tracking_status'] = $this->getTrackingStatus()->toArray();
153
        $array['tracking_history'] = $this->getTrackingHistory()->toArray();
154
155
        return $array;
156
    }
157
}
158