Completed
Push — GildedRose/AlbertAndMarcos ( c4eed1 )
by Albert
02:33
created

Item   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 16
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
wmc 2
c 0
b 0
f 0
lcom 0
cbo 0
dl 0
loc 16
ccs 0
cts 7
cp 0
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __toString() 0 3 1
A __construct() 0 5 1
1
<?php
2
3
namespace Kata\GildedRoseKata;
4
5
final class Item {
6
7
    public $name;
8
    public $sell_in;
9
    public $quality;
10
11
    function __construct($name, $sell_in, $quality) {
0 ignored issues
show
Best Practice introduced by
It is generally recommended to explicitly declare the visibility for methods.

Adding explicit visibility (private, protected, or public) is generally recommend to communicate to other developers how, and from where this method is intended to be used.

Loading history...
12
        $this->name = $name;
13
        $this->sell_in = $sell_in;
14
        $this->quality = $quality;
15
    }
16
17
    public function __toString() {
18
        return "{$this->name}, {$this->sell_in}, {$this->quality}";
19
    }
20
}
21