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.

Character::equals()   A
last analyzed

Complexity

Conditions 3
Paths 3

Size

Total Lines 9
Code Lines 5

Duplication

Lines 9
Ratio 100 %

Importance

Changes 0
Metric Value
c 0
b 0
f 0
dl 9
loc 9
rs 9.6666
cc 3
eloc 5
nc 3
nop 1
1
<?php
2
3
namespace UCD\Unicode;
4
5
use UCD\Unicode\Codepoint;
6
use UCD\Unicode\Character\Properties;
7
8
class Character implements CodepointAssigned, Comparable
9
{
10
    /**
11
     * @var Codepoint
12
     */
13
    private $codepoint;
14
15
    /**
16
     * @var Properties
17
     */
18
    private $properties;
19
20
    /**
21
     * @param Codepoint $codepoint
22
     * @param Properties $properties
23
     */
24
    public function __construct(Codepoint $codepoint, Properties $properties)
25
    {
26
        $this->codepoint = $codepoint;
27
        $this->properties = $properties;
28
    }
29
30
    /**
31
     * @return Codepoint
32
     */
33
    public function getCodepoint()
34
    {
35
        return $this->codepoint;
36
    }
37
38
    /**
39
     * @return int
40
     */
41
    public function getCodepointValue()
42
    {
43
        return $this->codepoint->getValue();
44
    }
45
46
    /**
47
     * @return Properties
48
     */
49
    public function getProperties()
50
    {
51
        return $this->properties;
52
    }
53
54
    /**
55
     * @return Properties\General
56
     */
57
    public function getGeneralProperties()
58
    {
59
        return $this->properties->getGeneral();
60
    }
61
62
    /**
63
     * @param mixed $other
64
     * @return bool
65
     */
66 View Code Duplication
    public function equals($other)
0 ignored issues
show
Duplication introduced by
This method 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...
67
    {
68
        if ($this === $other) {
69
            return true;
70
        }
71
72
        return $other instanceof self
73
            && $this->codepoint->equals($other->codepoint);
74
    }
75
}