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 (30)

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/Model/Addon.php (1 issue)

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 Speicher210\Monsum\Api\Model;
4
5
use JMS\Serializer\Annotation as JMS;
6
7
/**
8
 * Addon model.
9
 */
10
class Addon
11
{
12
    /**
13
     * The article number.
14
     *
15
     * @var string
16
     *
17
     * @JMS\Type("string")
18
     * @JMS\SerializedName("ARTICLE_NUMBER")
19
     */
20
    protected $articleNumber;
21
22
    /**
23
     * Quantity.
24
     *
25
     * @var integer
26
     *
27
     * @JMS\Type("integer")
28
     * @JMS\SerializedName("QUANTITY")
29
     */
30
    protected $quantity;
31
32
    /**
33
     * The title of the addon.
34
     *
35
     * @var string
36
     *
37
     * @JMS\Type("string")
38
     * @JMS\SerializedName("TITLE")
39
     */
40
    protected $title;
41
42
    /**
43
     * The description of the on.
44
     *
45
     * @var string
46
     *
47
     * @JMS\Type("string")
48
     * @JMS\SerializedName("DESCRIPTION")
49
     */
50
    protected $description;
51
52
    /**
53
     * The unit price.
54
     *
55
     * @var float
56
     *
57
     * @JMS\Type("float")
58
     * @JMS\SerializedName("UNIT_PRICE")
59
     */
60
    protected $unitPrice;
61
62
    /**
63
     * VAT percent.
64
     *
65
     * @var float
66
     *
67
     * @JMS\Type("float")
68
     * @JMS\SerializedName("VAT_PERCENT")
69
     */
70
    protected $vatPercent;
71
72
    /**
73
     * Constructor.
74
     *
75
     * @param string $articleNumber The article number.
76
     * @param integer $quantity The quantity.
77
     * @param string $title The title.
78
     * @param string $description The description.
79
     * @param float $unitPrice The price.
80
     * @param float $vatPercent The VAT percentage.
81
     */
82
    public function __construct($articleNumber, $quantity, $title, $description, $unitPrice, $vatPercent)
83
    {
84
        $this->setArticleNumber($articleNumber);
85
        $this->setQuantity($quantity);
86
        $this->setTitle($title);
87
        $this->setDescription($description);
88
        $this->setUnitPrice($unitPrice);
89
        $this->setVatPercent($vatPercent);
90
    }
91
92
    /**
93
     * Get the article number.
94
     *
95
     * @return integer
96
     */
97
    public function getArticleNumber()
98
    {
99
        return $this->articleNumber;
100
    }
101
102
    /**
103
     * Set the article number.
104
     *
105
     * @param string $articleNumber The article number.
106
     * @return $this
107
     */
108
    public function setArticleNumber($articleNumber)
109
    {
110
        $this->articleNumber = $articleNumber;
111
112
        return $this;
113
    }
114
115
    /**
116
     * Get the quantity.
117
     *
118
     * @return integer
119
     */
120
    public function getQuantity()
121
    {
122
        return $this->quantity;
123
    }
124
125
    /**
126
     * Set the quantity.
127
     *
128
     * @param integer $quantity The quantity.
129
     * @return $this
130
     * @throws \InvalidArgumentException If the quantity is less than 1
131
     */
132
    public function setQuantity($quantity)
133
    {
134
        if ($quantity < 1) {
135
            throw new \InvalidArgumentException('Quantity must be bigger than 0.');
136
        }
137
        $this->quantity = $quantity;
138
139
        return $this;
140
    }
141
142
    /**
143
     * Get the title.
144
     *
145
     * @return string
146
     */
147
    public function getTitle()
148
    {
149
        return $this->title;
150
    }
151
152
    /**
153
     * Set the title.
154
     *
155
     * @param string $title The title.
156
     * @return $this
157
     */
158
    public function setTitle($title)
159
    {
160
        $this->title = $title;
161
162
        return $this;
163
    }
164
165
    /**
166
     * Get the description.
167
     *
168
     * @return string
169
     */
170
    public function getDescription()
171
    {
172
        return $this->description;
173
    }
174
175
    /**
176
     * Set the description.
177
     *
178
     * @param string $description The description.
179
     * @return $this
180
     */
181
    public function setDescription($description)
182
    {
183
        $this->description = $description;
184
185
        return $this;
186
    }
187
188
    /**
189
     * Get the unit price.
190
     *
191
     * @return float
192
     */
193
    public function getUnitPrice()
194
    {
195
        return $this->unitPrice;
196
    }
197
198
    /**
199
     * Set the unit price.
200
     *
201
     * @param float $unitPrice The price.
202
     * @return $this
203
     */
204
    public function setUnitPrice($unitPrice)
205
    {
206
        $this->unitPrice = $unitPrice;
207
208
        return $this;
209
    }
210
211
    /**
212
     * Get the VAT percentage.
213
     *
214
     * @return float
215
     */
216
    public function getVatPercent()
217
    {
218
        return $this->vatPercent;
219
    }
220
221
    /**
222
     * Set the VAT percentage.
223
     *
224
     * @param float $vatPercent The VAT percentage.
225
     * @return $this
226
     * @throws \InvalidArgumentException If the percent is not between 0 and 100
227
     */
228 View Code Duplication
    public function setVatPercent($vatPercent)
0 ignored issues
show
This method seems to be duplicated in your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
229
    {
230
        if ($vatPercent < 0 || $vatPercent > 100) {
231
            throw new \InvalidArgumentException('VAT percentage must be between 0-100');
232
        }
233
        $this->vatPercent = $vatPercent;
234
235
        return $this;
236
    }
237
}
238