Passed
Push — master ( 3fd808...c2290a )
by Jakub
01:52
created

SkippedTest   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 20
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 3
Bugs 0 Features 1
Metric Value
wmc 3
eloc 10
c 3
b 0
f 1
dl 0
loc 20
ccs 9
cts 9
cp 1
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A __toString() 0 7 2
1
<?php
2
3
declare(strict_types=1);
4
5
namespace MyTester;
6
7
/**
8
 * Skipped test info
9
 *
10
 * @author Jakub Konečný
11
 */
12
final class SkippedTest
13
{
14
    use \Nette\SmartObject;
15
16
    public string $name;
17
    public string $reason;
18
19 1
    public function __construct(string $name, string $reason)
20
    {
21 1
        $this->name = $name;
22 1
        $this->reason = $reason;
23 1
    }
24
25 1
    public function __toString(): string
26
    {
27 1
        $reason = "";
28 1
        if ($this->reason) {
29 1
            $reason = ": {$this->reason}";
30
        }
31 1
        return "Skipped $this->name$reason\n";
32
    }
33
}
34