Created
August 7, 2020 17:16
-
-
Save PJZ9n/0bc228073343da06d419601a79f94653 to your computer and use it in GitHub Desktop.
捨てるの勿体ない気がするから
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* @param int $type | |
* @param int $itemId | |
* @param int $itemDamage | |
* | |
* @return ShopItem|null | |
*/ | |
public function searchShopItem(int $type, int $itemId, int $itemDamage): ?ShopItem | |
{ | |
foreach ($this->shopItems as $shopItem) { | |
if ( | |
$shopItem->getType() === $type && | |
$shopItem->getItemId() === $itemId && | |
$shopItem->getItemDamage() === $itemDamage | |
) { | |
return $shopItem; | |
} | |
} | |
return null; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment