PhpStorm inspections

Fixed some minor bugs and dropped some obsolete code

pocketmine\level\generator namespace is ignored in this commit
This commit is contained in:
SOFe
2016-10-21 22:38:49 +08:00
committed by Dylan K. Taylor
parent e790573f2e
commit 175dd0efa6
21 changed files with 46 additions and 38 deletions

View File

@ -50,9 +50,11 @@ class Location extends Position{
* @param Level|null $level default null
* @param float $yaw default 0.0
* @param float $pitch default 0.0
*
* @return Location
*/
public static function fromObject(Vector3 $pos, Level $level = null, $yaw = 0.0, $pitch = 0.0){
return new Location($pos->x, $pos->y, $pos->z, $yaw, $pitch, ($level === null) ? (($pos instanceof Position) ? $pos->level : null) : $level);
return new Location($pos->x, $pos->y, $pos->z, $yaw, $pitch, $level ?? (($pos instanceof Position) ? $pos->level : null));
}
public function getYaw(){