mirror of
https://github.com/emilybache/GildedRose-Refactoring-Kata.git
synced 2026-02-13 13:42:00 +00:00
chore: update Aged Brie quality
This commit is contained in:
parent
80a2e70216
commit
5a11204272
@ -18,14 +18,14 @@ final class GildedRose
|
||||
public function updateQuality(): void
|
||||
{
|
||||
foreach ($this->items as $item) {
|
||||
|
||||
if ($item->name === 'Sulfuras, Hand of Ragnaros') {
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
if ($item->name != 'Aged Brie' and $item->name != 'Backstage passes to a TAFKAL80ETC concert') {
|
||||
$item->quality = max(0, --$item->quality);
|
||||
} else if ($item->name === 'Aged Brie') {
|
||||
$item->quality = min(50, ++$item->quality);
|
||||
} else {
|
||||
if ($item->quality < 50) {
|
||||
$item->quality = $item->quality + 1;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user