mirror of
https://github.com/emilybache/GildedRose-Refactoring-Kata.git
synced 2026-02-14 06:01:39 +00:00
chore: backstage passes quality should be 0 after concert
This commit is contained in:
parent
e6bf563126
commit
a64e2c6a6e
@ -47,21 +47,13 @@ final class GildedRose
|
|||||||
}
|
}
|
||||||
|
|
||||||
if ($item->sellIn < 0) {
|
if ($item->sellIn < 0) {
|
||||||
|
|
||||||
if ($item->name != 'Backstage passes to a TAFKAL80ETC concert') {
|
|
||||||
if ($item->quality > 0) {
|
|
||||||
if ($item->name != 'Sulfuras, Hand of Ragnaros') {
|
|
||||||
$item->quality = $item->quality - 1;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
$item->quality = $item->quality - $item->quality;
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($item->name === 'Aged Brie') {
|
if ($item->name === 'Aged Brie') {
|
||||||
$item->quality = max(50, $item->quality++);
|
$item->quality = max(50, $item->quality++);
|
||||||
|
} else if ($item->name === 'Backstage passes to a TAFKAL80ETC concert') {
|
||||||
|
$item->quality = 0;
|
||||||
|
} else if ($item->quality > 0 && $item->name !== 'Sulfuras, Hand of Ragnaros') {
|
||||||
|
$item->quality--;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user