Fixed wtf in Durable->setDamage() exception throw

This commit is contained in:
Dylan K. Taylor 2018-10-27 21:50:14 +01:00 committed by GitHub
parent f4105fd91a
commit e1795dfd49
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -76,7 +76,7 @@ abstract class Durable extends Item{
public function setDamage(int $damage) : Item{ public function setDamage(int $damage) : Item{
if($damage < 0 or $damage > $this->getMaxDurability()){ if($damage < 0 or $damage > $this->getMaxDurability()){
throw new \InvalidArgumentException("Damage must be in range 0 - " , $this->getMaxDurability()); throw new \InvalidArgumentException("Damage must be in range 0 - " . $this->getMaxDurability());
} }
$this->damage = $damage; $this->damage = $damage;
return $this; return $this;