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

@ -173,13 +173,13 @@ class Permission{
* @param string|Permission $name
* @param $value
*
* @return Permission|void Permission if $name is a string, void if it's a Permission
* @return Permission|null Permission if $name is a string, null if it's a Permission
*/
public function addParent($name, $value){
if($name instanceof Permission){
$name->getChildren()[$this->getName()] = $value;
$name->recalculatePermissibles();
return;
return null;
}else{
$perm = Server::getInstance()->getPluginManager()->getPermission($name);
if($perm === null){

View File

@ -89,9 +89,6 @@ class PermissionAttachment{
return $this->permissions;
}
/**
* @return bool[]
*/
public function clearPermissions(){
$this->permissions = [];
$this->permissible->recalculatePermissions();