ProjectID   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 33
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 5
c 1
b 0
f 0
dl 0
loc 33
rs 10
wmc 3

3 Methods

Rating   Name   Duplication   Size   Complexity  
A getID() 0 3 1
A __construct() 0 3 1
A __toString() 0 3 1
1
<?php // Copyright ⓒ 2018 Magneds IP B.V. - All Rights Reserved
2
namespace Magneds\Lokalise\Project\Entity;
3
4
class ProjectID
5
{
6
    /**
7
     * @var string
8
     */
9
    protected $id;
10
11
    /**
12
     * ProjectID constructor.
13
     * @param string $id
14
     */
15
    public function __construct(string $id)
16
    {
17
        $this->id = $id;
18
    }
19
20
    /**
21
     * @return string
22
     */
23
    public function getID(): string
24
    {
25
        return $this->id;
26
    }
27
28
    /**
29
     * The __toString method allows a class to decide how it will react when it is converted to a string.
30
     *
31
     * @return string
32
     * @link http://php.net/manual/en/language.oop5.magic.php#language.oop5.magic.tostring
33
     */
34
    public function __toString()
35
    {
36
        return $this->id;
37
    }
38
}
39