ProjectID::getID()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 1
c 1
b 0
f 0
nc 1
nop 0
dl 0
loc 3
rs 10
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