and more typehints

This commit is contained in:
Dylan K. Taylor
2017-07-14 10:56:51 +01:00
parent b9355387da
commit c3b8be3f60
119 changed files with 598 additions and 541 deletions

View File

@@ -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;
}
}