mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-10-18 20:14:31 +00:00
and more typehints
This commit is contained in:
@@ -63,7 +63,7 @@ class PermissibleBase implements Permissible{
|
||||
/**
|
||||
* @return bool
|
||||
*/
|
||||
public function isOp(){
|
||||
public function isOp() : bool{
|
||||
if($this->opable === null){
|
||||
return false;
|
||||
}else{
|
||||
@@ -76,7 +76,7 @@ class PermissibleBase implements Permissible{
|
||||
*
|
||||
* @throws \Exception
|
||||
*/
|
||||
public function setOp($value){
|
||||
public function setOp(bool $value){
|
||||
if($this->opable === null){
|
||||
throw new \LogicException("Cannot change op value as no ServerOperator is set");
|
||||
}else{
|
||||
@@ -89,7 +89,7 @@ class PermissibleBase implements Permissible{
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function isPermissionSet($name){
|
||||
public function isPermissionSet($name) : bool{
|
||||
return isset($this->permissions[$name instanceof Permission ? $name->getName() : $name]);
|
||||
}
|
||||
|
||||
@@ -98,7 +98,7 @@ class PermissibleBase implements Permissible{
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function hasPermission($name){
|
||||
public function hasPermission($name) : bool{
|
||||
if($name instanceof Permission){
|
||||
$name = $name->getName();
|
||||
}
|
||||
@@ -214,7 +214,7 @@ class PermissibleBase implements Permissible{
|
||||
/**
|
||||
* @return PermissionAttachmentInfo[]
|
||||
*/
|
||||
public function getEffectivePermissions(){
|
||||
public function getEffectivePermissions() : array{
|
||||
return $this->permissions;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user