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

Item   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 27
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 8
dl 0
loc 27
rs 10
c 0
b 0
f 0
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 5 1
A __toString() 0 3 1
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