Add the @return types

This commit is contained in:
2022-07-27 10:26:43 +02:00
parent 89e26be943
commit ed8449d321
13 changed files with 30 additions and 31 deletions

View File

@@ -59,7 +59,7 @@ class Authorizationdb extends Authorization
/** Return if the user right is NONE, READ, WRITE, EXECUTE
if the object doesn't exists, or is not readable, throw an exception
@param string $object The object path to examine
@return an array with READ, WRITE, EXECUTE */
@return array with READ, WRITE, EXECUTE */
public function validate ($object)
{
if ($this->db === null)
@@ -136,7 +136,7 @@ class Authorizationdb extends Authorization
@param integer $ownerid Owner ID of the object
@param integer $groupid Group ID of the object
@param integer $modbits Bits of authorization
@return TRUE or an exception with the error message */
@return boolean TRUE or an exception with the error message */
public function add ($object, $ownerid, $groupid, $modbits)
{
if ($this->db === null)
@@ -205,7 +205,7 @@ class Authorizationdb extends Authorization
/** Remove the information about an object and all its sub-objects
@param string $object Object path to drop
@return TRUE or an exception with the error message */
@return boolean TRUE or an exception with the error message */
public function drop ($object)
{
if ($this->db === null)
@@ -279,7 +279,7 @@ class Authorizationdb extends Authorization
Need to be the root administrator
@param string $object Object path to add
@param integer $ownerid Owner ID of the object
@return TRUE or an exception with the error message */
@return boolean TRUE or an exception with the error message */
public function chown ($object, $ownerid)
{
if ($this->db === null)
@@ -322,7 +322,7 @@ class Authorizationdb extends Authorization
Need to be the ownerid of the object or the root administrator
@param string $object Object path to add
@param integer $groupid Group ID of the object
@return TRUE or an exception with the error message */
@return boolean TRUE or an exception with the error message */
public function chgrp ($object, $groupid)
{
if ($this->db === null)
@@ -368,7 +368,7 @@ class Authorizationdb extends Authorization
Need to be the owner of the object or the root administrator
@param string $object Object path to change
@param integer $mod Bits of authorization
@return TRUE or an exception with the error message */
@return boolean TRUE or an exception with the error message */
public function chmod ($object, $mod)
{
if ($this->db === null)
@@ -411,7 +411,7 @@ class Authorizationdb extends Authorization
/** Return the mode bits for an object if all his parents are readable for
the user
@param string $object Object path to examine
@return the modbits or an exception with the error message */
@return int|float the modbits or an exception with the error message */
public function lsmod ($object)
{
if ($this->db === null)
@@ -449,7 +449,7 @@ class Authorizationdb extends Authorization
/** Return the ownerid for an object if all his parents are readable for
the user
@param string $object Object path to examine
@return the ownerid or an exception with the error message */
@return integer the ownerid or an exception with the error message */
public function lsown ($object)
{
if ($this->db === null)
@@ -487,7 +487,7 @@ class Authorizationdb extends Authorization
/** Return the groupid for an object if all his parents are readable for
the user
@param string $object Object path to examine
@return the groupid or an exception with the error message */
@return integer the groupid or an exception with the error message */
public function lsgrp ($object)
{
if ($this->db === null)
@@ -527,7 +527,7 @@ class Authorizationdb extends Authorization
////////////////////
/** Check if all the parent objects are executable
@param string $object The object to test
@return TRUE or an exception in case of error */
@return boolean TRUE or an exception in case of error */
private function treecheckExecute ($object)
{
if ($this->db === null)
@@ -602,7 +602,7 @@ class Authorizationdb extends Authorization
/** Check if the parent of object is writeable
@param string $object The object to found
@return TRUE or an exception */
@return boolean TRUE or an exception */
private function treecheckWrite ($object)
{
$parent = dirname ($object);