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.

Identity::getPropertyName()   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
dl 0
loc 4
c 0
b 0
f 0
rs 10
cc 1
eloc 2
nc 1
nop 0
1
<?php
2
3
namespace Isolate\UnitOfWork\Entity\Definition;
4
5
use Isolate\UnitOfWork\Exception\InvalidArgumentException;
6
7
/**
8
 * @api
9
 */
10
final class Identity
11
{
12
    /**
13
     * @var string
14
     */
15
    private $propertyName;
16
17
    /**
18
     * @param string $propertyName
19
     * @throws InvalidArgumentException
20
     */
21
    public function __construct($propertyName)
22
    {
23
        if (!is_string($propertyName)) {
24
            throw new InvalidArgumentException("Property name must be a valid string.");
25
        }
26
27
        if (empty($propertyName)) {
28
            throw new InvalidArgumentException("Property name can't be empty.");
29
        }
30
31
        $this->propertyName = $propertyName;
32
    }
33
34
    /**
35
     * @return string
36
     * 
37
     * @api
38
     */
39
    public function getPropertyName()
40
    {
41
        return $this->propertyName;
42
    }
43
44
    /**
45
     * @param string $propertyPath
46
     * @return bool
47
     * 
48
     * @api
49
     */
50
    public function isEqual($propertyPath)
51
    {
52
        return $this->propertyName === $propertyPath;
53
    }
54
}
55