Add the @return types
This commit is contained in:
@@ -82,7 +82,7 @@ class Authentication
|
||||
|
||||
/** Setter/Getter for debug
|
||||
* @param integer|null $debug The debug value to get/set
|
||||
* @return the actual value or this
|
||||
* @return integer|self the actual value or this
|
||||
*/
|
||||
public function debug ($debug = null)
|
||||
// {{{
|
||||
@@ -380,7 +380,7 @@ class Authentication
|
||||
* properties of the class.
|
||||
* @param string $email The email to check
|
||||
* @param string $password The password to check
|
||||
* @return an array containing the user data if the authentication is
|
||||
* @return array containing the user data if the authentication is
|
||||
* correct,
|
||||
* an exception if noting is found
|
||||
*/
|
||||
|
||||
@@ -106,7 +106,7 @@ class Authjwt extends Auth
|
||||
/** Save the auth data in cache directory and return the JWT token
|
||||
* Do not allow to store data if the $auth is anonymous
|
||||
* @param array $auth The authentication to save
|
||||
* @return JWT token string
|
||||
* @return string JWT token
|
||||
*/
|
||||
public function createJwtToken ($auth)
|
||||
// {{{
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -270,7 +270,7 @@ class Console
|
||||
* @param string $propo Preset the text for the user
|
||||
* @param boolean|string $stopperChar The chars to stop the analysis and
|
||||
* return the result
|
||||
* @return The typed string
|
||||
* @return string The typed string
|
||||
*/
|
||||
public function readline ($propo = "", $stopperChar = false)
|
||||
// {{{
|
||||
|
||||
@@ -921,7 +921,7 @@ class Mail
|
||||
/** Get an attachment of the mail
|
||||
* @param integer $number the number of attach to get starting to 0
|
||||
* @param boolean|null $inline Return only the attachments Inline if true
|
||||
* @return the content of the attachment. Can be binary
|
||||
* @return string the content of the attachment. Can be binary
|
||||
*/
|
||||
public function getAttachment ($number, $inline = false)
|
||||
// {{{
|
||||
|
||||
@@ -69,7 +69,7 @@ class Password
|
||||
// }}}
|
||||
|
||||
/** Create a salt, based on openssl_random_pseudo_bytes function
|
||||
* @return a string salt
|
||||
* @return string a string salt
|
||||
*/
|
||||
public function salt ()
|
||||
// {{{
|
||||
@@ -165,7 +165,7 @@ class Password
|
||||
* chars).
|
||||
* A maximum of 20% for special chars in the size
|
||||
* @param integer|null $nbChars The number of chars (12 by default)
|
||||
* @return The random password
|
||||
* @return string The random password
|
||||
*/
|
||||
static public function generateASCII ($nbChars = 12)
|
||||
// {{{
|
||||
@@ -194,7 +194,7 @@ class Password
|
||||
/** Create a random password with $nbChars chars, Alphanumericals chars
|
||||
* (without special chars)
|
||||
* @param integer|null $nbChars The number of chars (12 by default)
|
||||
* @return The random password
|
||||
* @return string The random password
|
||||
*/
|
||||
static public function generateAlphanum ($nbChars = 12)
|
||||
// {{{
|
||||
@@ -219,7 +219,7 @@ class Password
|
||||
/** Create a random password with $nbChars chars, Alphabeticals chars
|
||||
* (without special chars, neither numbers)
|
||||
* @param integer|null $nbChars The number of chars (12 by default)
|
||||
* @return The random password
|
||||
* @return string The random password
|
||||
*/
|
||||
static public function generateAlphabetical ($nbChars = 12)
|
||||
// {{{
|
||||
|
||||
@@ -709,7 +709,7 @@ class Route
|
||||
}
|
||||
|
||||
/** Return the last valid get page to return
|
||||
* @return The last valid page URL
|
||||
* @return string The last valid page URL or "" if not set
|
||||
*/
|
||||
public function lastValidGetPage ()
|
||||
{
|
||||
|
||||
@@ -168,7 +168,7 @@ class Smtp
|
||||
* @param string|array $to the recipient of the email. Not displayed in the
|
||||
* email content
|
||||
* @param string $completeMail The content of the email
|
||||
* @return the message from the server (where is stored the message queue
|
||||
* @return string the message from the server (where is stored the message queue
|
||||
* identifier
|
||||
*/
|
||||
public function send ($from, $to, $completeMail)
|
||||
|
||||
@@ -205,8 +205,7 @@ class Spfcheck
|
||||
|
||||
/** Get the DNS values set for the provided $domain/$part(/$entity)
|
||||
* @param string $search The search entity
|
||||
* @return array The array of result from DNS
|
||||
* @return false if not exists
|
||||
* @return array|boolean The array of result from DNS or false if not exists
|
||||
*/
|
||||
public function getDNSEntries ($search)
|
||||
{
|
||||
|
||||
@@ -309,7 +309,7 @@ class Sse
|
||||
/** Initialize the backend for one specific file.
|
||||
* @param string $event The event to start
|
||||
* @param string $filePath The file path where the event data are stored
|
||||
* @return false if the file doesn't exists
|
||||
* @return boolean false if the file doesn't exists
|
||||
*/
|
||||
private function backendInitEvent ($event, $filePath)
|
||||
// {{{
|
||||
|
||||
@@ -198,8 +198,8 @@ class Tcpclient
|
||||
* @param boolean $val True to activate, false to disable SSL
|
||||
* @param integer|null $cryptoMethod The cryptoMethod allowed
|
||||
* @param array|null $options Can overload the SSL options if needed
|
||||
* @return false if the client can not found a encryption method with the
|
||||
* server
|
||||
* @return boolean false if the client can not found a encryption method
|
||||
* with the server
|
||||
*/
|
||||
public function cryptoEnable ($val, $cryptoMethod = null, $options = array ())
|
||||
// {{{
|
||||
@@ -258,7 +258,7 @@ class Tcpclient
|
||||
* In text mode, the read return when found the first \r\n, and doesn't
|
||||
* returns the \r\n.
|
||||
* @param integer $maxLength Limit the length of the data from the server
|
||||
* @return The content
|
||||
* @return string The content
|
||||
*/
|
||||
public function read ($maxLength = 1024)
|
||||
// {{{
|
||||
|
||||
@@ -350,7 +350,7 @@ class Tcpserver
|
||||
// }}}
|
||||
|
||||
/** Start the main loop in background and do not wait its end
|
||||
* @return the PID of the child
|
||||
* @return integer the PID of the child
|
||||
*/
|
||||
final public function loopInBackgroundStart ()
|
||||
// {{{
|
||||
@@ -507,7 +507,7 @@ class Tcpserver
|
||||
* Use the readMode in text or binary (text by default)
|
||||
* In text mode, the read return when found the first \r or the first \n.
|
||||
* @param integer $maxLength Limit the length of the data from the server
|
||||
* @return The content
|
||||
* @return string The content
|
||||
*/
|
||||
final public function read ($maxLength = 1024)
|
||||
// {{{
|
||||
|
||||
@@ -208,7 +208,7 @@ class Xmppclient
|
||||
|
||||
// PRIVATE METHODS //
|
||||
/** Read fron socket
|
||||
* @return the read value
|
||||
* @return string the read value
|
||||
*/
|
||||
private function read ()
|
||||
// {{{
|
||||
|
||||
Reference in New Issue
Block a user