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.
Completed
Push — 5.0 ( c6890e...9916e2 )
by Jonny
24:09
created

ClipRect::jsonSerialize()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 9
Code Lines 6

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 9
rs 9.6666
c 0
b 0
f 0
cc 1
eloc 6
nc 1
nop 0
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\Page;
11
12
/**
13
 * PHP PhantomJs.
14
 *
15
 * @author Jon Wenmoth <[email protected]>
16
 */
17
class ClipRect implements \JsonSerializable
18
{
19
    /**
20
     * Width.
21
     *
22
     * @var int
23
     */
24
    private $width;
25
26
    /**
27
     * Height.
28
     *
29
     * @var int
30
     */
31
    private $height;
32
33
    /**
34
     * Top.
35
     *
36
     * @var int
37
     */
38
    private $top;
39
40
    /**
41
     * Left.
42
     *
43
     * @var int
44
     */
45
    private $left;
46
47
    /**
48
     * Internal constructor.
49
     *
50
     * @param int $width
51
     * @param int $height
52
     * @param int $top    (default: 0)
53
     * @param int $left   (default: 0)
54
     */
55
    public function __construct($width, $height, $top = 0, $left = 0)
56
    {
57
        $this->width = (int) $width;
58
        $this->height = (int) $height;
59
        $this->top = (int) $top;
60
        $this->left = (int) $left;
61
    }
62
63
    /**
64
     * Format data for JSON serialization.
65
     *
66
     * @return array
67
     */
68
    public function jsonSerialize()
69
    {
70
        return array(
71
            'top' => $this->top,
72
            'left' => $this->left,
73
            'width' => $this->width,
74
            'height' => $this->height,
75
        );
76
    }
77
}
78