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

TestWarning::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 3
CRAP Score 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 2
c 1
b 0
f 0
dl 0
loc 4
rs 10
ccs 3
cts 3
cp 1
cc 1
nc 1
nop 2
crap 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