Answer   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 0
Metric Value
wmc 3
lcom 1
cbo 0
dl 0
loc 38
ccs 8
cts 8
cp 1
rs 10
c 0
b 0
f 0

3 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 3 1
A getText() 0 4 1
A create() 0 8 1
1
<?php
2
3
namespace Hangman\Move;
4
5
use MiniGame\Move;
6
7
class Answer implements Move
8
{
9
    /**
10
     * @var string
11
     */
12
    private $text;
13
14
    /**
15
     * Constructor.
16
     */
17 18
    public function __construct()
18
    {
19 18
    }
20
21
    /**
22
     * @return string
23
     */
24 15
    public function getText()
25
    {
26 15
        return $this->text;
27
    }
28
29
    /**
30
     * Static constructor.
31
     *
32
     * @param $text
33
     *
34
     * @return Answer
35
     */
36 18
    public static function create($text)
37
    {
38 18
        $obj = new self();
39
40 18
        $obj->text = $text;
41
42 18
        return $obj;
43
    }
44
}
45