mirror of
https://github.com/emilybache/GildedRose-Refactoring-Kata.git
synced 2026-02-14 06:01:39 +00:00
chore: remove un-needed if condition
This commit is contained in:
parent
a7d48bbf13
commit
6faeed5b7d
@ -53,12 +53,11 @@ final class GildedRose
|
|||||||
|
|
||||||
if ($item->sellIn < 0) {
|
if ($item->sellIn < 0) {
|
||||||
if ($item->name === 'Aged Brie') {
|
if ($item->name === 'Aged Brie') {
|
||||||
$item->quality = max(50, $item->quality++);
|
$item->quality = min(50, ++$item->quality);
|
||||||
} else if ($item->name === 'Backstage passes to a TAFKAL80ETC concert') {
|
} else if ($item->name === 'Backstage passes to a TAFKAL80ETC concert')
|
||||||
$item->quality = 0;
|
$item->quality = 0;
|
||||||
} else if ($item->quality > 0 && $item->name !== 'Sulfuras, Hand of Ragnaros') {
|
else
|
||||||
$item->quality--;
|
$item->quality = max(0, --$item->quality);
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user