Replace disallowed operators in src/item/

This commit is contained in:
Dylan K. Taylor
2022-01-20 19:16:50 +00:00
parent 373880e582
commit 22fb02c4e6
11 changed files with 25 additions and 25 deletions

View File

@@ -62,7 +62,7 @@ abstract class Durable extends Item{
* @return bool if any damage was applied to the item
*/
public function applyDamage(int $amount) : bool{
if($this->isUnbreakable() or $this->isBroken()){
if($this->isUnbreakable() || $this->isBroken()){
return false;
}
@@ -81,7 +81,7 @@ abstract class Durable extends Item{
}
public function setDamage(int $damage) : Item{
if($damage < 0 or $damage > $this->getMaxDurability()){
if($damage < 0 || $damage > $this->getMaxDurability()){
throw new \InvalidArgumentException("Damage must be in range 0 - " . $this->getMaxDurability());
}
$this->damage = $damage;