TwitterMessageId   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 38
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 0

Test Coverage

Coverage 100%

Importance

Changes 1
Bugs 0 Features 1
Metric Value
wmc 3
lcom 1
cbo 0
dl 0
loc 38
ccs 8
cts 8
cp 1
rs 10
c 1
b 0
f 1

3 Methods

Rating   Name   Duplication   Size   Complexity  
A __toString() 0 4 1
A create() 0 8 1
A __construct() 0 3 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