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

PaperFormat::jsonSerialize()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 10
Code Lines 7

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 10
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 7
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 PaperFormat extends PaperSize
18
{
19
    /**
20
     * Format.
21
     *
22
     * @var string
23
     */
24
    private $format;
25
26
    /**
27
     * Orientation.
28
     *
29
     * @var string
30
     */
31
    private $orientation;
32
33
    /**
34
     * Internal constructor.
35
     *
36
     * @param string                           $format
37
     * @param string                           $orientation (default: 'portrait')
38
     * @param int|JonnyW\PhantomJs\Page\Margin $margin      (default: 0)
39
     */
40
    public function __construct($format, $orientation = 'portrait', $margin = 0)
41
    {
42
        $this->format = $format;
43
        $this->orientation = $orientation;
44
        $this->margin = $margin;
45
    }
46
47
    /**
48
     * Format data for JSON serialization.
49
     *
50
     * @return array
51
     */
52
    public function jsonSerialize()
53
    {
54
        return array_filter(array(
55
            'format' => $this->format,
56
            'orientation' => $this->orientation,
57
            'margin' => $this->margin,
58
            'header' => $this.header,
59
            'footer' => $this->footer,
60
        ));
61
    }
62
}
63