chore: backstage passes quality should be 0 after concert

This commit is contained in:
EmanFateen 2025-11-22 22:53:20 +02:00
parent e6bf563126
commit a64e2c6a6e

View File

@ -47,21 +47,13 @@ final class GildedRose
}
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') {
$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--;
}
}
}
}