TwitterMessageId::create()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 8
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 4
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 8
ccs 4
cts 4
cp 1
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 4
nc 1
nop 1
crap 1
1
<?php
2
3
namespace Twitter;
4
5
class TwitterMessageId
6
{
7
    /**
8
     * @var string
9
     */
10
    private $id;
11
12
    /**
13
     * Constructor.
14
     */
15 99
    public function __construct()
16
    {
17 99
    }
18
19
    /**
20
     * @return string
21
     */
22 36
    public function __toString()
23
    {
24 36
        return (string) $this->id;
25
    }
26
27
    /**
28
     * Static constructor.
29
     *
30
     * @param  mixed $id
31
     *
32
     * @return TwitterMessageId
33
     */
34 99
    public static function create($id)
35
    {
36 99
        $obj = new self();
37
38 99
        $obj->id = $id;
39
40 99
        return $obj;
41
    }
42
}
43