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

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/JonnyW/PhantomJs/Http/PdfRequest.php (8 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
/*
4
 * This file is part of the php-phantomjs.
5
 *
6
 * For the full copyright and license information, please view the LICENSE
7
 * file that was distributed with this source code.
8
 */
9
10
namespace JonnyW\PhantomJs\Http;
11
12
/**
13
 * PHP PhantomJs
14
 *
15
 * @author Jon Wenmoth <[email protected]>
16
 */
17
class PdfRequest extends CaptureRequest
18
    implements PdfRequestInterface
19
{
20
    /**
21
     * Paper width
22
     *
23
     * @var int
24
     * @access protected
25
     */
26
    protected $paperWidth;
27
28
    /**
29
     * Paper height
30
     *
31
     * @var int
32
     * @access protected
33
     */
34
    protected $paperHeight;
35
36
    /**
37
     * Format
38
     *
39
     * @var string
40
     * @access protected
41
     */
42
    protected $format;
43
44
    /**
45
     * Orientation
46
     *
47
     * @var string
48
     * @access protected
49
     */
50
    protected $orientation;
51
52
    /**
53
     * Margin
54
     *
55
     * @var string|array
56
     * @access protected
57
     */
58
    protected $margin;
59
60
    /**
61
     * Repeating header
62
     *
63
     * @var array
64
     * @access protected
65
     */
66
    protected $header;
67
68
    /**
69
     * Repeating footer
70
     *
71
     * @var array
72
     * @access protected
73
     */
74
    protected $footer;
75
76
    /**
77
     * Internal constructor
78
     *
79
     * @access public
80
     * @param  string                                $url     (default: null)
81
     * @param  string                                $method  (default: RequestInterface::METHOD_GET)
82
     * @param  int                                   $timeout (default: 5000)
83
     * @return \JonnyW\PhantomJs\Http\CaptureRequest
0 ignored issues
show
Comprehensibility Best Practice introduced by
Adding a @return annotation to constructors is generally not recommended as a constructor does not have a meaningful return value.

Adding a @return annotation to a constructor is not recommended, since a constructor does not have a meaningful return value.

Please refer to the PHP core documentation on constructors.

Loading history...
84
     */
85 29
    public function __construct($url = null, $method = RequestInterface::METHOD_GET, $timeout = 5000)
86
    {
87 29
        parent::__construct($url, $method, $timeout);
88
89 29
        $this->paperWidth  = '';
0 ignored issues
show
Documentation Bug introduced by
The property $paperWidth was declared of type integer, but '' is of type string. Maybe add a type cast?

This check looks for assignments to scalar types that may be of the wrong type.

To ensure the code behaves as expected, it may be a good idea to add an explicit type cast.

$answer = 42;

$correct = false;

$correct = (bool) $answer;
Loading history...
90 29
        $this->paperHeight = '';
0 ignored issues
show
Documentation Bug introduced by
The property $paperHeight was declared of type integer, but '' is of type string. Maybe add a type cast?

This check looks for assignments to scalar types that may be of the wrong type.

To ensure the code behaves as expected, it may be a good idea to add an explicit type cast.

$answer = 42;

$correct = false;

$correct = (bool) $answer;
Loading history...
91 29
        $this->margin      = '1cm';
92 29
        $this->format      = 'A4';
93 29
        $this->orientation = 'portrait';
94 29
        $this->header      = array();
95 29
        $this->footer      = array();
96
97 29
    }
98
99
    /**
100
     * Get request type
101
     *
102
     * @access public
103
     * @return string
104
     */
105 8
    public function getType()
106
    {
107 8
        if (!$this->type) {
108 7
            return RequestInterface::REQUEST_TYPE_PDF;
109
        }
110
111 1
        return $this->type;
112
    }
113
114
    /**
115
     * Set paper width.
116
     *
117
     * @access public
118
     * @param  string $width
119
     * @return void
120
     */
121
    public function setPaperWidth($width)
122
    {
123
        $this->paperWidth = $width;
0 ignored issues
show
Documentation Bug introduced by
The property $paperWidth was declared of type integer, but $width is of type string. Maybe add a type cast?

This check looks for assignments to scalar types that may be of the wrong type.

To ensure the code behaves as expected, it may be a good idea to add an explicit type cast.

$answer = 42;

$correct = false;

$correct = (bool) $answer;
Loading history...
124
    }
125
126
    /**
127
     * Get paper width.
128
     *
129
     * @access public
130
     * @return string
131
     */
132 7
    public function getPaperWidth()
133
    {
134 7
        return $this->paperWidth;
135
    }
136
137
    /**
138
     * Set paper height.
139
     *
140
     * @access public
141
     * @param  string $height
142
     * @return void
143
     */
144
    public function setPaperHeight($height)
145
    {
146
        $this->paperHeight = $height;
0 ignored issues
show
Documentation Bug introduced by
The property $paperHeight was declared of type integer, but $height is of type string. Maybe add a type cast?

This check looks for assignments to scalar types that may be of the wrong type.

To ensure the code behaves as expected, it may be a good idea to add an explicit type cast.

$answer = 42;

$correct = false;

$correct = (bool) $answer;
Loading history...
147
    }
148
149
    /**
150
     * Get paper height.
151
     *
152
     * @access public
153
     * @return string
154
     */
155 7
    public function getPaperHeight()
156
    {
157 7
        return $this->paperHeight;
158
    }
159
160
    /**
161
     * Set paper size.
162
     *
163
     * @access public
164
     * @param  string $width
165
     * @param  string $height
166
     * @return void
167
     */
168 3
    public function setPaperSize($width, $height)
169
    {
170 3
        $this->paperWidth  = $width;
0 ignored issues
show
Documentation Bug introduced by
The property $paperWidth was declared of type integer, but $width is of type string. Maybe add a type cast?

This check looks for assignments to scalar types that may be of the wrong type.

To ensure the code behaves as expected, it may be a good idea to add an explicit type cast.

$answer = 42;

$correct = false;

$correct = (bool) $answer;
Loading history...
171 3
        $this->paperHeight = $height;
0 ignored issues
show
Documentation Bug introduced by
The property $paperHeight was declared of type integer, but $height is of type string. Maybe add a type cast?

This check looks for assignments to scalar types that may be of the wrong type.

To ensure the code behaves as expected, it may be a good idea to add an explicit type cast.

$answer = 42;

$correct = false;

$correct = (bool) $answer;
Loading history...
172 3
    }
173
174
    /**
175
     * Set format.
176
     *
177
     * @access public
178
     * @param  string $format
179
     * @return void
180
     */
181 4
    public function setFormat($format)
182
    {
183 4
        $this->format = $format;
184 4
    }
185
186
    /**
187
     * Get format.
188
     *
189
     * @access public
190
     * @return string
191
     */
192 6
    public function getFormat()
193
    {
194 6
        return $this->format;
195
    }
196
197
    /**
198
     * Set orientation.
199
     *
200
     * @access public
201
     * @param  string $orientation
202
     * @return void
203
     */
204 3
    public function setOrientation($orientation)
205
    {
206 3
        $this->orientation = $orientation;
207 3
    }
208
209
    /**
210
     * Get orientation.
211
     *
212
     * @access public
213
     * @return string
214
     */
215 6
    public function getOrientation()
216
    {
217 6
        return $this->orientation;
218
    }
219
220
    /**
221
     * Set margin.
222
     *
223
     * @access public
224
     * @param  string|array $margin
225
     * @return void
226
     */
227 5
    public function setMargin($margin)
228
    {
229 5
        $this->margin = $margin;
230 5
    }
231
232
    /**
233
     * Get margin.
234
     *
235
     * @access public
236
     * @return string|array
237
     */
238 6
    public function getMargin()
239
    {
240 6
        return $this->margin;
0 ignored issues
show
Bug Compatibility introduced by
The expression $this->margin; of type string|array adds the type array to the return on line 240 which is incompatible with the return type declared by the interface JonnyW\PhantomJs\Http\Pd...estInterface::getMargin of type string.
Loading history...
241
    }
242
243
    /**
244
     * Set repeating header.
245
     *
246
     * @access public
247
     * @param  string $content
248
     * @param  string $height  (default: '1cm')
249
     * @return void
250
     */
251 2
    public function setRepeatingHeader($content, $height = '1cm')
252
    {
253 2
        $this->header = array(
254 2
            'content' => $content,
255
            'height'  => $height
256 2
        );
257 2
    }
258
259
    /**
260
     * Get repeating header.
261
     *
262
     * @access public
263
     * @return array
264
     */
265 6
    public function getRepeatingHeader()
266
    {
267 6
        return $this->header;
268
    }
269
270
    /**
271
     * Set repeating footer.
272
     *
273
     * @access public
274
     * @param  string $content
275
     * @param  string $height  (default: '1cm')
276
     * @return void
277
     */
278 2
    public function setRepeatingFooter($content, $height = '1cm')
279
    {
280 2
        $this->footer = array(
281 2
            'content' => $content,
282
            'height'  => $height
283 2
        );
284 2
    }
285
286
    /**
287
     * Get repeating footer.
288
     *
289
     * @access public
290
     * @return array
291
     */
292 6
    public function getRepeatingFooter()
293
    {
294 6
        return $this->footer;
295
    }
296
}
297