mirror of
https://github.com/emilybache/GildedRose-Refactoring-Kata.git
synced 2026-10-15 10:33:53 +00:00
Add a special rule for Sulfuras quality
This commit is contained in:
1 parent
c17454032b
commit
501cb7e041
2 files changed
+7
-1
No files matched your search
@@ -12,6 +12,12 @@ final class GildedRose {
|
||||
|
||||
public function updateQuality() {
|
||||
foreach ($this->items as $item) {
|
||||
if ($item->name === 'Sulfuras, Hand of Ragnaros') {
|
||||
$item->quality = 80;
|
||||
|
||||
continue;
|
||||
}
|
||||
|
||||
if ($item->name != 'Aged Brie' and $item->name != 'Backstage passes to a TAFKAL80ETC concert') {
|
||||
if ($item->quality > 0) {
|
||||
if ($item->name != 'Sulfuras, Hand of Ragnaros') {
|
||||
|
||||
Reference in new issue
Block a user