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.

Axis::__construct()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 2
nc 1
nop 2
dl 0
loc 4
rs 10
c 0
b 0
f 0
1
<?php
2
/**
3
 * This file is part of the O2System Framework package.
4
 *
5
 * For the full copyright and license information, please view the LICENSE
6
 * file that was distributed with this source code.
7
 *
8
 * @author         Steeve Andrian Salim
9
 * @copyright      Copyright (c) Steeve Andrian Salim
10
 */
11
12
// ------------------------------------------------------------------------
13
14
namespace O2System\Image\Dimension;
15
16
// ------------------------------------------------------------------------
17
18
/**
19
 * Class Axis
20
 *
21
 * @package O2System\Image\Dimension
22
 */
23
class Axis
24
{
25
    /**
26
     * Axis::$x
27
     *
28
     * Image x axis.
29
     *
30
     * @var int
31
     */
32
    protected $x = 0;
33
34
    /**
35
     * Axis::$y
36
     *
37
     * Image y axis.
38
     *
39
     * @var int
40
     */
41
    protected $y = 0;
42
43
    // ------------------------------------------------------------------------
44
45
    /**
46
     * Axis::__construct
47
     *
48
     * @param int $x Image x axis.
49
     * @param int $y Image y axis.
50
     */
51
    public function __construct($x = 0, $y = 0)
52
    {
53
        $this->x = (int)$x;
54
        $this->y = (int)$y;
55
    }
56
57
    // ------------------------------------------------------------------------
58
59
    /**
60
     * Axis::withX
61
     *
62
     * Gets image axis with new x axis.
63
     *
64
     * @return static
65
     */
66
    public function withX($x)
67
    {
68
        $newAxis = clone $this;
69
        $newAxis->x = (int)$x;
70
71
        return $newAxis;
72
    }
73
74
    // ------------------------------------------------------------------------
75
76
    /**
77
     * Axis::withY
78
     *
79
     * Gets image axis with new y axis.
80
     *
81
     * @return static
82
     */
83
    public function withY($y)
84
    {
85
        $newAxis = clone $this;
86
        $newAxis->y = (int)$y;
87
88
        return $newAxis;
89
    }
90
91
    // ------------------------------------------------------------------------
92
93
    /**
94
     * Axis::getX
95
     *
96
     * Gets image x axis.
97
     *
98
     * @return int
99
     */
100
    public function getX()
101
    {
102
        return $this->x;
103
    }
104
105
    // ------------------------------------------------------------------------
106
107
    /**
108
     * Axis::getY
109
     *
110
     * Gets image y axis.
111
     *
112
     * @return int
113
     */
114
    public function getY()
115
    {
116
        return $this->y;
117
    }
118
}