mirror of
https://github.com/emilybache/GildedRose-Refactoring-Kata.git
synced 2026-02-17 15:31:27 +00:00
Quality decrease twice after sell date.
This commit is contained in:
parent
92bc550f78
commit
7c4100b08b
@ -32,9 +32,6 @@ final class GildedRose {
|
|||||||
$item->quality = $item->quality + 3;
|
$item->quality = $item->quality + 3;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if ($item->sell_in < 0) {
|
|
||||||
$item->quality = 0;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -48,7 +45,7 @@ final class GildedRose {
|
|||||||
if ($item->name != 'Backstage passes to a TAFKAL80ETC concert') {
|
if ($item->name != 'Backstage passes to a TAFKAL80ETC concert') {
|
||||||
if ($item->quality > 0) {
|
if ($item->quality > 0) {
|
||||||
if ($item->name != 'Sulfuras, Hand of Ragnaros') {
|
if ($item->name != 'Sulfuras, Hand of Ragnaros') {
|
||||||
$item->quality = $item->quality - 1;
|
$item->quality = $item->quality - 2;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user