Fix some strict type violations reported by PhpStorm (strict types <3)

This commit is contained in:
Dylan K. Taylor
2017-06-04 09:50:49 +01:00
parent b775e8c88a
commit cf07af8b55
6 changed files with 18 additions and 17 deletions

View File

@ -74,7 +74,7 @@ abstract class Projectile extends Entity{
* @return int
*/
public function getResultDamage() : int{
return ceil(sqrt($this->motionX ** 2 + $this->motionY ** 2 + $this->motionZ ** 2) * $this->damage);
return (int) ceil(sqrt($this->motionX ** 2 + $this->motionY ** 2 + $this->motionZ ** 2) * $this->damage);
}
public function onCollideWithEntity(Entity $entity){