String comparison operators.

This commit is contained in:
Povilas Brilius 2020-05-01 20:00:31 +03:00
parent 72b70fe094
commit 9fc06142b3

View File

@ -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;
}