Test Failed
Push — master ( a5a28b...999969 )
by Marcin
02:51
created

Point   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 33
Duplicated Lines 100 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 0
Metric Value
wmc 3
lcom 0
cbo 0
dl 33
loc 33
rs 10
c 0
b 0
f 0

3 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 5 5 1
A getX() 4 4 1
A getY() 4 4 1

How to fix   Duplicated Code   

Duplicated Code

Duplicate code is one of the most pungent code smells. A rule that is often used is to re-structure code once it is duplicated in three or more places.

Common duplication problems, and corresponding solutions are:

1
<?php
2
/**
3
 * Grandstream-XMLApp
4
 *
5
 * Copyright (c) 2017 pudelek.org.pl
6
 *
7
 * @license MIT License (MIT)
8
 *
9
 * For the full copyright and license information, please view source file
10
 * that is bundled with this package in the file LICENSE
11
 *
12
 * @author Marcin Pudełek <[email protected]>
13
 */
14
15
namespace mrcnpdlk\Grandstream\XMLApp\Helper;
16
17
/**
18
 * Class Point
19
 *
20
 * @package mrcnpdlk\Grandstream\XMLApp\Helper
21
 */
22 View Code Duplication
class Point
0 ignored issues
show
Duplication introduced by
This class seems to be duplicated in your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
23
{
24
    /**
25
     * @var int
26
     */
27
    private $iX;
28
    /**
29
     * @var int
30
     */
31
    private $iY;
32
33
    public function __construct(int $x, int $y)
34
    {
35
        $this->iX = $x;
36
        $this->iY = $y;
37
    }
38
39
    /**
40
     * @return int
41
     */
42
    public function getX()
43
    {
44
        return $this->iX;
45
    }
46
47
    /**
48
     * @return int
49
     */
50
    public function getY()
51
    {
52
        return $this->iY;
53
    }
54
}
55