mirror of
https://github.com/emilybache/GildedRose-Refactoring-Kata.git
synced 2026-02-16 06:51:27 +00:00
String comparison operators.
This commit is contained in:
parent
72b70fe094
commit
9fc06142b3
@ -52,14 +52,14 @@ final class GildedRose
|
||||
if ($item->name === 'Sulfuras, Hand of Ragnaros') {
|
||||
continue;
|
||||
}
|
||||
if ($item->name != 'Aged Brie' && $item->name != 'Backstage passes to a TAFKAL80ETC concert') {
|
||||
if ($item->name !== 'Aged Brie' && $item->name !== 'Backstage passes to a TAFKAL80ETC concert') {
|
||||
if ($item->quality > 0) {
|
||||
$item->quality--;
|
||||
}
|
||||
} else {
|
||||
if ($item->quality < 50) {
|
||||
$item->quality++;
|
||||
if ($item->name == 'Backstage passes to a TAFKAL80ETC concert') {
|
||||
if ($item->name === 'Backstage passes to a TAFKAL80ETC concert') {
|
||||
if ($item->sell_in <= 10) {
|
||||
$item->quality += 2;
|
||||
}
|
||||
@ -73,8 +73,8 @@ final class GildedRose
|
||||
$item->sell_in--;
|
||||
|
||||
if ($item->sell_in < 0) {
|
||||
if ($item->name != 'Aged Brie') {
|
||||
if ($item->name != 'Backstage passes to a TAFKAL80ETC concert') {
|
||||
if ($item->name !== 'Aged Brie') {
|
||||
if ($item->name !== 'BackstageString passes to a TAFKAL80ETC concert') {
|
||||
if ($item->quality > 0) {
|
||||
$item->quality -= 2;
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user