Answer::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 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