Passed
Push — develop ( 745cf8...734f70 )
by ANTHONIUS
05:36 queued 03:34
created

TestCase::setResult()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
cc 1
eloc 1
nc 1
nop 1
dl 0
loc 3
ccs 0
cts 3
cp 0
crap 2
rs 10
c 0
b 0
f 0
1
<?php
2
3
/*
4
 * This file is part of the doyo/behat-code-coverage project.
5
 *
6
 * (c) Anthonius Munthi <[email protected]>
7
 *
8
 * For the full copyright and license information, please view the LICENSE
9
 * file that was distributed with this source code.
10
 */
11
12
declare(strict_types=1);
13
14
namespace Doyo\Behat\Coverage\Bridge\CodeCoverage;
15
16
class TestCase
17
{
18
    const RESULT_UNKNOWN = -1;
19
    const RESULT_PASSED  = 0;
20
    const RESULT_SKIPPED = 1;
21
    const RESULT_ERROR   = 5;
22
    const RESULT_FAILED  = 3;
23
24
    private $name;
25
26
    private $result;
27
28
    public function __construct($name)
29
    {
30
        $this->name = $name;
31
    }
32
33
    public function setResult($result)
34
    {
35
        $this->result = $result;
36
    }
37
38
    public function getResult()
39
    {
40
        return $this->result;
41
    }
42
43
    /**
44
     * @return string
45
     */
46
    public function getName()
47
    {
48
        return $this->name;
49
    }
50
}
51