Added some asserts

This commit is contained in:
Shoghi Cervantes
2015-09-27 19:48:42 +02:00
parent eaef40618b
commit cf3d8f449e
9 changed files with 30 additions and 41 deletions

View File

@ -78,9 +78,7 @@ class Position extends Vector3{
* @throws LevelException
*/
public function getSide($side, $step = 1){
if(!$this->isValid()){
throw new LevelException("Undefined Level reference");
}
assert($this->isValid());
return Position::fromObject(parent::getSide($side, $step), $this->level);
}