mirror of
https://github.com/emilybache/GildedRose-Refactoring-Kata.git
synced 2026-10-15 02:25:40 +00:00
Full test suite with 100% coverage.
This commit is contained in:
1 parent
d1b6306324
commit
c17454032b
4 files changed
+45
-7
No files matched your search
@@ -2,15 +2,15 @@
|
||||
|
||||
namespace App;
|
||||
|
||||
class GildedRose {
|
||||
final class GildedRose {
|
||||
|
||||
private $items = [];
|
||||
|
||||
function __construct($items) {
|
||||
public function __construct($items) {
|
||||
$this->items = $items;
|
||||
}
|
||||
|
||||
function updateQuality() {
|
||||
public function updateQuality() {
|
||||
foreach ($this->items as $item) {
|
||||
if ($item->name != 'Aged Brie' and $item->name != 'Backstage passes to a TAFKAL80ETC concert') {
|
||||
if ($item->quality > 0) {
|
||||
|
||||
+1
-1
@@ -2,7 +2,7 @@
|
||||
|
||||
namespace App;
|
||||
|
||||
class Item {
|
||||
final class Item {
|
||||
|
||||
public $name;
|
||||
public $sell_in;
|
||||
|
||||
Reference in new issue
Block a user