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   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 46
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Importance

Changes 0
Metric Value
wmc 2
lcom 1
cbo 1
dl 0
loc 46
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 6 1
A jsonSerialize() 0 10 1
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