Passed
Push — master ( 983636...0512e4 )
by Jakub
01:45
created

TestWarning   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 16
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 2
eloc 7
c 1
b 0
f 0
dl 0
loc 16
rs 10
ccs 6
cts 6
cp 1

2 Methods

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