Test Failed
Push — main ( 6df04e...456b77 )
by Alexandra
11:41 queued 02:13
created

Item::__toString()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 1
nc 1
nop 0
dl 0
loc 3
rs 10
c 0
b 0
f 0
1
<?php
2
3
declare(strict_types=1);
4
5
namespace AHJ\ApprovalTests\Tests\Example;
6
7
final class Item
8
{
9
    /**
10
     * @var string
11
     */
12
    public $name;
13
14
    /**
15
     * @var int
16
     */
17
    public $sell_in;
18
19
    /**
20
     * @var int
21
     */
22
    public $quality;
23
24
    public function __construct(string $name, int $sell_in, int $quality)
25
    {
26
        $this->name = $name;
27
        $this->sell_in = $sell_in;
28
        $this->quality = $quality;
29
    }
30
31
    public function __toString(): string
32
    {
33
        return "{$this->name}, {$this->sell_in}, {$this->quality}";
34
    }
35
}
36