Passed
Branch master (c6aee6)
by Jakub
02:15
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
ccs 5
cts 5
cp 1
rs 10
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
final readonly class TestWarning
0 ignored issues
show
Bug introduced by
A parse error occurred: Syntax error, unexpected T_READONLY, expecting T_CLASS on line 11 at column 6
Loading history...
12
{
13
    use \Nette\SmartObject;
14
15
    public string $name;
16
    public string $text;
17
18 1
    public function __construct(string $name, string $text)
19
    {
20 1
        $this->name = $name;
21 1
        $this->text = $text;
22
    }
23
24 1
    public function __toString(): string
25
    {
26 1
        return "$this->name passed with warning: $this->text";
27
    }
28
}
29